Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have 2 modules in a particular Project. Each module is a Sub. I'm trying
to call one module within another module and I'm getting the following error: Compile Error: Expected variable or procedure, not module The two modules a TallySheetRepDump and BanSumSort This is how I'm trying to call the module: Sub TallySheetRepDump() Call BanSumSort ... I basically want the code inside BanSumSort to run immediately upon the execution of the TallySheetRepDump routine then continue with the code in TallySheetRepDump. What am I doing wrong? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Subroutine names need to be different from the names of the modules.
Just change the subroutine name to "TallySheetRepDumpSub" or something of the sort. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() A module is a container for one or more Sub and/or Function procedures. It makes no sense to "call a module". Rather, you need to call the procedure in the module. Call ProcedureName ' or Call ModuleName.ProcedureName Note that a module can contain any number of Sub and/or Function procedures. It is not required that a module contains only one procedure (although it is harmless to do so). Cordially, Chip Pearson Microsoft Most Valuable Professional Excel Product Group, 1998 - 2009 Pearson Software Consulting, LLC www.cpearson.com (email on web site) On Fri, 10 Apr 2009 10:42:08 -0700, Bishop wrote: I have 2 modules in a particular Project. Each module is a Sub. I'm trying to call one module within another module and I'm getting the following error: Compile Error: Expected variable or procedure, not module The two modules a TallySheetRepDump and BanSumSort This is how I'm trying to call the module: Sub TallySheetRepDump() Call BanSumSort ... I basically want the code inside BanSumSort to run immediately upon the execution of the TallySheetRepDump routine then continue with the code in TallySheetRepDump. What am I doing wrong? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Remote module call | Excel Programming | |||
Module call | Excel Programming | |||
How to call a sub from UserForm Module | Excel Programming | |||
Call a Module | Excel Programming | |||
Call other sub in the same module | Excel Programming |