I am opening an excel 2000 workbook in VB6 and I need it to run an macro on open?

How do I do this?  I have it set for Auto_Open and that doesn't work.  Workbook_open didn't work either.  The macro I need to open refreshes data from data sources.
sjmmajorAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
RanjeetRainConnect With a Mentor Commented:
Dim XL As Object
Set XL = CreateObject("excel.Application")
With XL.Application
    XL.Visible = True
    XL.Run "Your_Macro_Name_Here"
    XL.Quit
End With

Set XL = Nothing
0
 
RanjeetRainCommented:
Kickstart the macro yourself.
0
 
sjmmajorAuthor Commented:
It worked!!  Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.