Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
N10 N10 is offline
external usenet poster
 
Posts: 141
Default Calling a procedure in a procedure


"Alex" wrote in message
...
I'm getting the following error..

Compile Error:

Expected variable or procedure, not module

When I run my macro and it shows this part of my code....

Finish = MsgBox("Click YES to finish report, Click NO to end." & Chr(13) &

_
"Rerun the M & S Macro if you need to add more reports", vbYesNo +
vbInformation)
If Finish = vbYes Then
Summary '<----- THIS PART IS HIGHLIGHTED ON ERROR
Exit Sub
Else
MsgBox "Let me know if this macro has helped you."
End If

BTW I do have a variable for this though it's not here.

Any ideas why the error?



I new to programming so I may be off the mark here

should the code nor read


If Finish = vbYes Then
call Summary
Exit Sub
Else
MsgBox "Let me know if this macro has helped you."
End If

Hope this helps

Best N10


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default Calling a procedure in a procedure



"N10" wrote:


I new to programming so I may be off the mark here

should the code nor read


If Finish = vbYes Then
call Summary
Exit Sub
Else
MsgBox "Let me know if this macro has helped you."
End If

Hope this helps

Best N10


If' tried using CALL as well but get the same error. VBA knows that with or
without the CALL statement, I want to run the additional procedure.
  #3   Report Post  
Posted to microsoft.public.excel.programming
N10 N10 is offline
external usenet poster
 
Posts: 141
Default Calling a procedure in a procedure


"Alex" wrote in message
...


"N10" wrote:


I new to programming so I may be off the mark here

should the code nor read


If Finish = vbYes Then
call Summary
Exit Sub
Else
MsgBox "Let me know if this macro has helped you."
End If

Hope this helps

Best N10


If' tried using CALL as well but get the same error. VBA knows that with

or
without the CALL statement, I want to run the additional procedure.



Could Summary be an allocated term in VBA ?

Like coding call OPEN would cause an error

Also does the routine Summary when ran directly ?



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
Problems calling a procedure in another application msk19[_3_] Excel Programming 1 September 14th 04 12:49 PM
Calling a procedure in a procedure Don Guillett[_4_] Excel Programming 1 August 17th 04 11:31 PM
VBA question - calling Procedure from userform ajliaks[_3_] Excel Programming 2 April 14th 04 09:11 PM
Calling a .Net Procedure from a Macro Scott Eguires Excel Programming 0 December 10th 03 10:35 PM
Calling a Custom Function within a Procedure [email protected] Excel Programming 1 November 16th 03 03:51 AM


All times are GMT +1. The time now is 10:33 AM.

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

About Us

"It's about Microsoft Excel"