Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What is the proper syntax to run a macro which has
parameters in a specified workbook? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi,
If the macro is in the current WB then toolsMacrosmacrorun should do it. you will be prompted of the perameters. If the macro is to be run on another WB then code must be add to open the other workbook. ChDir "C:\dir1" Workbooks.Open Filename:="C:\Dir1\file2.xls" or if open to activate the file. Windows("file2.xls").Activate -----Original Message----- What is the proper syntax to run a macro which has parameters in a specified workbook? . |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Actually I need to run a macro in a specific workbook
throufh a VB.exe I wrote. The excel workbook is never visible. How do I run a function that takes parameters in a workbook through VB6? -----Original Message----- hi, If the macro is in the current WB then toolsMacrosmacrorun should do it. you will be prompted of the perameters. If the macro is to be run on another WB then code must be add to open the other workbook. ChDir "C:\dir1" Workbooks.Open Filename:="C:\Dir1\file2.xls" or if open to activate the file. Windows("file2.xls").Activate -----Original Message----- What is the proper syntax to run a macro which has parameters in a specified workbook? . . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Eric,
What is the proper syntax to run a macro which has parameters in a specified workbook? From VB: xlApp.Run "WorkbookName.xls!RoutineName", arg1, arg2 where xlApp is a variable referencing the Excel Application object. Regards Stephen Bullen Microsoft MVP - Excel www.BMSLtd.ie |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Check the Application object's Run method.
-- Regards, Tushar Mehta www.tushar-mehta.com Excel, PowerPoint, and VBA add-ins, tutorials Custom MS Office productivity solutions In article , says... What is the proper syntax to run a macro which has parameters in a specified workbook? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
saving macro from workbook to Personal Macro Workbook | Excel Discussion (Misc queries) | |||
Combine worksheets in multiple workbook in one workbook with a macro | Excel Discussion (Misc queries) | |||
Macro to copy an image (or picture) from one workbook to a new sheetin another workbook | Excel Worksheet Functions | |||
Need a macro to copy a range in one workbook and paste into another workbook | Excel Programming | |||
Excel Gurus = want a macro in 1 workbook to get info from another workbook = Read please | Excel Programming |