Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can a sub in an add-in call a sub in another workbook? I need the add-in sub
to call a sub in the active workbook; the name of the active workbook changes. Cannot figure out how to do this - keep getting error messages with the application.run method. Any help would be appreciated.....thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can use Application.Run to do this. Something like
Sub RunIt() Dim WBName As String WBName = ActiveWorkbook.Name Application.Run "'" & WBName & "'!ProcedureName" End Sub Cordially, Chip Pearson Microsoft MVP Excel Product Group Pearson Software Consulting, LLC www.cpearson.com (email on web site) On Mon, 15 Dec 2008 08:59:01 -0800, Paige wrote: Can a sub in an add-in call a sub in another workbook? I need the add-in sub to call a sub in the active workbook; the name of the active workbook changes. Cannot figure out how to do this - keep getting error messages with the application.run method. Any help would be appreciated.....thanks. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks, Chip - works like a charm!
"Chip Pearson" wrote: You can use Application.Run to do this. Something like Sub RunIt() Dim WBName As String WBName = ActiveWorkbook.Name Application.Run "'" & WBName & "'!ProcedureName" End Sub Cordially, Chip Pearson Microsoft MVP Excel Product Group Pearson Software Consulting, LLC www.cpearson.com (email on web site) On Mon, 15 Dec 2008 08:59:01 -0800, Paige wrote: Can a sub in an add-in call a sub in another workbook? I need the add-in sub to call a sub in the active workbook; the name of the active workbook changes. Cannot figure out how to do this - keep getting error messages with the application.run method. Any help would be appreciated.....thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Problem in updating all worksheets of a workbook using a macro that calls another macro | Excel Programming | |||
Closing Hidden Workbook when Active Workbook is Closed | Excel Programming | |||
copy worksheet from closed workbook to active workbook using vba | Excel Worksheet Functions | |||
Any automation calls gets hung when the Excel workbook has an active cell. | Excel Programming | |||
Preventing opening workbook inside active workbook. | Excel Programming |