Run Macro with Excel Object ( from MS. Visual FoxPro 7.0 )
Hi Programmer,
You can add a macro to an Excel workbook with automation using oExcel.ActiveWorkbook.VBProject.VBComponents("This Workbook").CodeModule.AddFromFile("C:\MacroCode.tx t") You can run your macro using oExcel.Application.Run("MyMacro") -- Cindy Winegarden MCSD, Microsoft Visual Foxpro MVP www.cindywinegarden.com Blog: http://spaces.msn.com/members/cindywinegarden "Visual FoxPro programmer" m wrote in message ... Hi, I have a routine, that creates a Workbook, and a lot of tables to make Graphs, but make graph with automation it's very afull, so i create a macro, and i have de Macro.bas ( module ). I want to link this macro to every workbook created with the routine, and launch (macro), but I'dont know how to link or bind the macro to the new workbook , and after that , launch. Regards, and good day Helpme !!!!!! |
All times are GMT +1. The time now is 01:49 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com