Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sometimes when I call a routine from a module I can just use the routine
name: Sub Routine_Clcik() Routine1 End Sub Other times I get the error: Compile error, Expected procedure, not variable and I have to use the module name: Sub Routine_Click() [Module1].Rouine1 End Sub Why is this? Thanks! RJH |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If the procedure is in a class module associated with one of the worksheets
or the workbook, you have to precede it with the class (module) name. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "RJH" wrote in message ... Sometimes when I call a routine from a module I can just use the routine name: Sub Routine_Clcik() Routine1 End Sub Other times I get the error: Compile error, Expected procedure, not variable and I have to use the module name: Sub Routine_Click() [Module1].Rouine1 End Sub Why is this? Thanks! RJH |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
These aren't Class Module calls. They are calls from ordinary modules, for
example: Module1, Module2, etc.. Thanks! RJH "Bob Phillips" wrote in message ... If the procedure is in a class module associated with one of the worksheets or the workbook, you have to precede it with the class (module) name. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "RJH" wrote in message ... Sometimes when I call a routine from a module I can just use the routine name: Sub Routine_Clcik() Routine1 End Sub Other times I get the error: Compile error, Expected procedure, not variable and I have to use the module name: Sub Routine_Click() [Module1].Rouine1 End Sub Why is this? Thanks! RJH |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Are you using the same sub name in multiple modules?
-- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "RJH" wrote in message ... These aren't Class Module calls. They are calls from ordinary modules, for example: Module1, Module2, etc.. Thanks! RJH "Bob Phillips" wrote in message ... If the procedure is in a class module associated with one of the worksheets or the workbook, you have to precede it with the class (module) name. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "RJH" wrote in message ... Sometimes when I call a routine from a module I can just use the routine name: Sub Routine_Clcik() Routine1 End Sub Other times I get the error: Compile error, Expected procedure, not variable and I have to use the module name: Sub Routine_Click() [Module1].Rouine1 End Sub Why is this? Thanks! RJH |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
No. Unique sub names in each module.
RJH "Bob Phillips" wrote in message ... Are you using the same sub name in multiple modules? -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "RJH" wrote in message ... These aren't Class Module calls. They are calls from ordinary modules, for example: Module1, Module2, etc.. Thanks! RJH "Bob Phillips" wrote in message ... If the procedure is in a class module associated with one of the worksheets or the workbook, you have to precede it with the class (module) name. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "RJH" wrote in message ... Sometimes when I call a routine from a module I can just use the routine name: Sub Routine_Clcik() Routine1 End Sub Other times I get the error: Compile error, Expected procedure, not variable and I have to use the module name: Sub Routine_Click() [Module1].Rouine1 End Sub Why is this? Thanks! RJH |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
to call procedure in a worksheet in a module | Excel Discussion (Misc queries) | |||
Remote 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 |