Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 260
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 260
Default 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
.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel application.quit in macro problem TimkenSteve New Users to Excel 3 August 17th 06 06:36 PM
macro to close excel application other than application.quit mary Excel Programming 1 September 14th 04 03:43 PM
Code to set NamedRange for all application-Languages Filips Benoit Excel Programming 1 August 5th 04 03:52 PM
Application error with VBA code jd Excel Programming 1 May 6th 04 09:42 AM
Code execution skips Application.Run statement Stuart[_5_] Excel Programming 2 March 6th 04 07:11 PM


All times are GMT +1. The time now is 01:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"