Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
calling macro in excel from VB program
I have an excel file opening all the time for getting real time quote
Can I using a VB program to trigger the excel file to run a macro for some other updates? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
calling macro in excel from VB program
On Mon, 19 Jul 2004 03:35:02 -0700, Fung
wrote: I have an excel file opening all the time for getting real time quote Can I using a VB program to trigger the excel file to run a macro for some other updates? Yes, you can. You need to define an object in the VB program and bind it to the Excel type library. Dim objExcel as Object Set objExcel = New Excel.Application Then in your code use objExcel.Run("<Macro Name", [<arg_1,...,<arg_n]) to cause Excel to trigger the macro (if that syntax doesn't work, try objExcel.Application.Run...I can't remember which one is correct). In VBA, simply use Application.Run("<Macro Name", [<arg1,...,<arg_n] HTH. -- Rodney S Baker VK5ZTV |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pivot Refresh Error when calling Excel Macro from VB.NET program | Excel Discussion (Misc queries) | |||
calling a C++ program from Excel 2000 and passing a result from C++ back to an excel spreadsheet | Excel Discussion (Misc queries) | |||
Calling Excel Macro From Vc++ via DDE | Excel Programming | |||
Calling Access Program from Excel | Excel Programming | |||
How disabling sounds when calling a shell program? | Excel Programming |