Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Rick,
The workbook will have to be opened to run the macro, whether your user does it or whether you do from your VB6 app. If you want some code on opening the workbook, try something like Set xlApp = CreateObject("Excel.Application") If Not xlApp Is Nothing Then xlApp.Workbooks.Open "D:\Bob\My Documents\My Spreadsheets\Lastcount.xls" xlApp.Visible = True xlApp.Run "LastCount.xls!Test" xlApp.Quit End If -- HTH Bob Phillips "Rick Griffith" wrote in message ... I've got a VB6 program that runs an excel 2000 macro fine if the spreadsheet is opened by user before running the VB program. If user doesn't open the spreadsheet an error occurs. Is there a way to eliminate need for user to open the spreadsheet? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Running Excel macro as a service | Excel Discussion (Misc queries) | |||
Running excel macro by scheduler | Excel Discussion (Misc queries) | |||
Excel running Word macro | Excel Discussion (Misc queries) | |||
Running a Macro automatically from Excel | Excel Worksheet Functions | |||
KERNEL32.DLL error after running EXCEL Macro | Excel Programming |