Running a excel macro from VB6

B

Bimal

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
 
B

Bob Phillips

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top