Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Public is not Public
Hi all,
Why a public sub (defined in a sheet module ) can not be called in code behind another sheet ? Clara -- thank you so much for your help |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Public is not Public
-- --- Regards, Norman Microsoft Excel MVP "clara" wrote in message ... Hi all, Why a public sub (defined in a sheet module ) can not be called in code behind another sheet ? Clara -- thank you so much for your help |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Public is not Public
Hi Clara
A public procedure should be placed in a standard module, not a sheet module. Try, therefore, moving the code to a standard module and your problem should be resolved. In general, a sheet mpodule should only be used for sheet event code, --- Regards, Norman "clara" wrote in message ... Hi all, Why a public sub (defined in a sheet module ) can not be called in code behind another sheet ? Clara -- thank you so much for your help |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Public is not Public
Hi Clara,
For additional information on the use of code modules, see Chip Pearson at: Code Module And Code Names http://www.cpearson.com/excel/codemods.htm --- Regards, Norman Microsoft Excel MVP |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Public is not Public
Since sheet modules are a class module you need to qualify the sub name.
For instance, if your public sub in Sheet1 is "test", then in the Sheet2 code module, use Call Sheet1.test Note that you should use the sheet's code name as the qualifier. In article , clara wrote: Why a public sub (defined in a sheet module ) can not be called in code behind another sheet ? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Public? | Excel Programming | |||
Use of PUBLIC | Excel Programming | |||
Dim vs. Public | Excel Programming | |||
public sub | Excel Programming | |||
Public Sub Help | Excel Programming |