Code:' I don't have a lot of experience in excel but I've ' handled littel jobbies like this ' I create a macro to do my excel work for me ' I then would call the file holding the macro ' ' of course if you need to enter information gathered ' on the fly throught your app and write it in this ' macro business is not what your are after ' ' then I would run this from my VB Application ' 'create and object (Excel SpreadSheet) Dim oXL As Object Set oXL = CreateObject("Excel.Application") ' Open the workbook that contains the macro to run. oXL.Workbooks.open "C:\Folder\MyFile.xls" ' 'as object opens invisible, make visible if needed, if not omit 'the line oXL.visible=true ' oXL.Visible = True ' ' Run the macro. oXL.Application.Run "MyFileName.xls!MyMacroName" ' ' Quit Microsoft Excel. oXL.Quit ' ' Free the object from memory. Set oXL = Nothing '




Reply With Quote