Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Running a excel macro from VB6

Is it possible to run few excel macro from VB6?
I have few macro that takes data from 4 diffrent
sheet of same workbook and then adds a report sheet
where it dumps the report(it also creats the temp
sheet 3 times and then delets the same after calculations
are over). I want to create a exe file from VB6 which
will take data from this workbook and produce the
report in the new workbook.


Will appreciate any guides or pointers as I am new in VB.
Regards,
Bimal
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Running a excel macro from VB6

http://support.microsoft.com/?kbid=177760
VBA: How to Run Macros in Other Office Programs
The above is for access, but would be the same for VB

http://support.microsoft.com/?kbid=165518
Calling Macros Using OLE from MS Visual Basic for Applications
Again, code would be applicable from VB

--
Regards,
Tom Ogilvy

"Bimal" wrote in message
m...
Is it possible to run few excel macro from VB6?
I have few macro that takes data from 4 diffrent
sheet of same workbook and then adds a report sheet
where it dumps the report(it also creats the temp
sheet 3 times and then delets the same after calculations
are over). I want to create a exe file from VB6 which
will take data from this workbook and produce the
report in the new workbook.


Will appreciate any guides or pointers as I am new in VB.
Regards,
Bimal



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Running a excel macro from VB6

Bimal,

Assuming that you have an Excel object called xlApp, try

xlApp.Run "myWorkbook!myMacro"

if you want it to run automatically on opening the workbook, put the code in
teh Workbook_Open event.


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Bimal" wrote in message
m...
Is it possible to run few excel macro from VB6?
I have few macro that takes data from 4 diffrent
sheet of same workbook and then adds a report sheet
where it dumps the report(it also creats the temp
sheet 3 times and then delets the same after calculations
are over). I want to create a exe file from VB6 which
will take data from this workbook and produce the
report in the new workbook.


Will appreciate any guides or pointers as I am new in VB.
Regards,
Bimal



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
Running excel macro by scheduler Dan Excel Discussion (Misc queries) 1 August 19th 07 11:48 PM
Excel running Word macro rsphorler Excel Discussion (Misc queries) 2 May 27th 07 01:19 AM
Excel-Macro running through SQL update. rudolpsh Excel Programming 0 January 22nd 04 12:39 PM
Launch Macro in Access via Macro running in Excel??? dgrant Excel Programming 1 September 24th 03 01:38 PM
Running Excel Macro from VB6 Rick Griffith Excel Programming 2 August 13th 03 07:05 PM


All times are GMT +1. The time now is 09:29 AM.

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"