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.