V
VanW
I'm trying to practice simple Sub Procedures and Functions
using the Immediate Window. I noticed when I define the
Sub or Function in a Standard Module and declare it
Public, I can test it in the Immediate Window. However, if
I define it in a Class Module (let's say behind a form)
declare as Public or Private and try to run it from the
Immediate Window, I get an error message that says the Sub
or Function is not defined. Can you not use the Immediate
Window to test Sub's and Functions within Class Modules?
What am I doing wrong? I used the following simple
procedures. Also, it would not work in the Standard
Module also, unless I declared it Public.
Examples:
Public Function CubeVolume(Width, Length, Height) As
Integer
CubeVolume = Width * Length * Height
End Function
Public Sub Testing()
MsgBox "Hellow World from Vanessa"
End Sub
Used correct snytax in Immediate Windos also:
? CubeVolume(3,3,3) [hit enter]
Testing [hit enter]
Thanks for any help in advance!!!!!!!!!!
Van
using the Immediate Window. I noticed when I define the
Sub or Function in a Standard Module and declare it
Public, I can test it in the Immediate Window. However, if
I define it in a Class Module (let's say behind a form)
declare as Public or Private and try to run it from the
Immediate Window, I get an error message that says the Sub
or Function is not defined. Can you not use the Immediate
Window to test Sub's and Functions within Class Modules?
What am I doing wrong? I used the following simple
procedures. Also, it would not work in the Standard
Module also, unless I declared it Public.
Examples:
Public Function CubeVolume(Width, Length, Height) As
Integer
CubeVolume = Width * Length * Height
End Function
Public Sub Testing()
MsgBox "Hellow World from Vanessa"
End Sub
Used correct snytax in Immediate Windos also:
? CubeVolume(3,3,3) [hit enter]
Testing [hit enter]
Thanks for any help in advance!!!!!!!!!!
Van