Calling Macros From VB6

  • Thread starter Thread starter Diehard
  • Start date Start date
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.
 
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.
 
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
 

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

Back
Top