View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Vanna Vanna is offline
external usenet poster
 
Posts: 9
Default Calling macro from a different moldule

Sorry, my mistake. I call the module name instead of the name of the sub
procedure.

"Vanna" wrote:

Thanks to your reply. I tied your suggestion but still get an error.
I created the macros in modules. Instead of calling them module1,
module2...I renamed the macros. In my main macro, I enter the follwing codes:

Sub main()
Call DelFre_Keystone
Call DelFre_Symmetry
Call DelFre_Folio
Call RecFre_Keystone
Call RecFre_Symmetry
Call RecFre_Foli
end sub()

I get an error "Compile Error" expected variables or procedures, not module


"mudraker" wrote:


If the macros are in a normal module sheet you do not need to declare
them as public

try

Sub MainMacro ()
Call Macro1
Call Macro2
Call Macro3
Call Macro4
MyInfo = Function5Result
End Sub


--
mudraker
------------------------------------------------------------------------
mudraker's Profile: http://www.excelforum.com/member.php...fo&userid=2473
View this thread: http://www.excelforum.com/showthread...hreadid=518093