Calling Macros From VB6

D

Diehard

I have an excel file with the macro inside the Personal.xls vba
project, when I open the the file from vb6, it does not open the
vbaproject(Personal.xls), but, when I open the file anywhere else, it
show the vbaproject.

What could I be doing wrong in vb6 code.

Your help will most be appriciated.
 
J

Jim Rech

When Excel is opened via automation it does not open any workbooks or add-in
automatically. You would have to add code to your app to open specific
workbooks.

--
Jim Rech
Excel MVP
|I have an excel file with the macro inside the Personal.xls vba
| project, when I open the the file from vb6, it does not open the
| vbaproject(Personal.xls), but, when I open the file anywhere else, it
| show the vbaproject.
|
| What could I be doing wrong in vb6 code.
|
| Your help will most be appriciated.
 
K

Keith Willshaw

Diehard said:
Hi

How do I add code to open specific workbooks?

Regards

Dim xlbook as Excel.Workbook

Set xlbook = xlapp.Workbooks.Open("WorkbookFilename.xls")

Keith
 
Top