![]() |
Application.run Macro Code Problem
Hey
Below is my code to run a procedure SMSClose in the SMSClose module of the workbook "Book1.xls". Application.Run "'" & TargetWB.Name & "'" & "!SMSClose" & Chr(34) Workbook "Book1.xls" is the book stored in variable TargetWB. When I go to run this code I get the following debug error: Run-Time error '1004': The macro "Book10'!SMSClose'" cannot be found. What am I doing wrong? Thank you Todd Huttenstine |
Application.run Macro Code Problem
hey guys, I got it. It was a SYNTAX problem.
Application.Run "'" & TargetWB.Name & "'!SMSFinish" -----Original Message----- Hey Below is my code to run a procedure SMSClose in the SMSClose module of the workbook "Book1.xls". Application.Run "'" & TargetWB.Name & "'" & "!SMSClose" & Chr(34) Workbook "Book1.xls" is the book stored in variable TargetWB. When I go to run this code I get the following debug error: Run-Time error '1004': The macro "Book10'!SMSClose'" cannot be found. What am I doing wrong? Thank you Todd Huttenstine . |
All times are GMT +1. The time now is 07:16 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com