Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm thinking that if you're trying to read from a variable in a
userform class, you need to ref the class as you would any other class. As Jim states, declaring a variable 'Public' in a userform keeps it private to the userform because it dies when the userform is unloaded. This is the same as what happens when a class terminates. Making the declaration 'Public', though, does make the variable behave like a property of the class and so should be handled as such. You do it right by trying to access it before unloading the userform, but because VB[A] doesn't know of it (unqualified ref) then you're SOL. Try... Range("A1").Value = LaunchForm.textvariable '//fully qualified ref Alternatively, you could make the vars global by declaring them in a standard module. This allows access to them from anywhere in your project. HTH -- Garry Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Passing Form Values | Excel Programming | |||
Passing Module to subroutine | Excel Programming | |||
Passing arrays to VBA module | Excel Programming | |||
Passing Strings from UserForm to Module | Excel Programming | |||
Passing variables from module to userform | Excel Programming |