Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Run Macro with Excel Object ( from MS. Visual FoxPro 7.0 )

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 !!!!!!


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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 !!!!!!




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Add Visual Foxpro 9 DBF import / Export to Excel 2007 mua Excel Worksheet Functions 1 August 17th 06 05:09 PM
REFERENCING WORKSHEET CELL FROM VISUAL FOXPRO FORM Alan Excel Discussion (Misc queries) 0 July 7th 06 08:05 AM
Require draggable visual object in Excel VBA [email protected] Excel Programming 1 March 23rd 05 01:28 PM
Excel 2003 Database Driver Visual FoxPro 7 on Server 2003. Cindy Winegarden Excel Discussion (Misc queries) 0 November 28th 04 12:07 AM
Creating a spreadsheet from Foxpro using Object Model Scott Excel Programming 1 August 5th 03 08:07 PM


All times are GMT +1. The time now is 04:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"