Solved

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

Posted on 2004-08-30
3
164 Views
Last Modified: 2010-05-02
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.
0
Comment
Question by:sjmmajor
  • 2
3 Comments
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 11931214
Kickstart the macro yourself.
0
 
LVL 19

Accepted Solution

by:
RanjeetRain earned 250 total points
ID: 11931230
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
 

Author Comment

by:sjmmajor
ID: 11931621
It worked!!  Thanks
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
to transfer string from C lanaguage to VBA 4 66
Copy a row 12 62
VB6 ListBox Question 4 44
Sub or Function is not defined 6 30
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question