C
CRayF
I have a module name question?
When I “Right click; View Code" on the worksheet, In the top left is
(Project – VBA Project) window; at the bottom I have a "Modules" folder and
in there I have 4 modules. 2 of which I seemed to have renamed and not “yetâ€
seeing a problem.
However, in the last module “Module3†It’s intended to be a sub module;
called by the worksheet module from 2 different points. *All curently runs
fine*.
The sub routing was created with the following name:
... Sub ReBuildProgramSummary(Optional Confirm As Boolean = True)
.... code...
From the Worksheet View Code, I call this sub routine with the following
command:
'------------------------------------------------------------------------
' [default/Changed!] Button - Re-Build Program Summary Template
'------------------------------------------------------------------------
If Target.Address = "$K$1" And ActiveSheet.Name <> _
srcProgramSummaryTemplateWs.Name Then
ReBuildProgramSummary True '<--- 1 -----
Range("K1").Value = "default"
End If
----------------------
All of this works fine…
Now, when I have this “ReBuildProgramSummary†sub routine selected, in
bottom left of this screen is a “Properties – Module3â€; it has a select
button below this with “Module3 Module†the only option, and below this on
the Alphabetic Tab is:
(Name) Module3.
When I try to change the (Name) field from Module3 to
“ReBuildProgramSummaryâ€, the
[ Compile Error - Expected variable or procedure, not module ]
at the ‘<----1 call above.
Can I not change this (Name) field name to match?
When I “Right click; View Code" on the worksheet, In the top left is
(Project – VBA Project) window; at the bottom I have a "Modules" folder and
in there I have 4 modules. 2 of which I seemed to have renamed and not “yetâ€
seeing a problem.
However, in the last module “Module3†It’s intended to be a sub module;
called by the worksheet module from 2 different points. *All curently runs
fine*.
The sub routing was created with the following name:
... Sub ReBuildProgramSummary(Optional Confirm As Boolean = True)
.... code...
From the Worksheet View Code, I call this sub routine with the following
command:
'------------------------------------------------------------------------
' [default/Changed!] Button - Re-Build Program Summary Template
'------------------------------------------------------------------------
If Target.Address = "$K$1" And ActiveSheet.Name <> _
srcProgramSummaryTemplateWs.Name Then
ReBuildProgramSummary True '<--- 1 -----
Range("K1").Value = "default"
End If
----------------------
All of this works fine…
Now, when I have this “ReBuildProgramSummary†sub routine selected, in
bottom left of this screen is a “Properties – Module3â€; it has a select
button below this with “Module3 Module†the only option, and below this on
the Alphabetic Tab is:
(Name) Module3.
When I try to change the (Name) field from Module3 to
“ReBuildProgramSummaryâ€, the
[ Compile Error - Expected variable or procedure, not module ]
at the ‘<----1 call above.
Can I not change this (Name) field name to match?