I have a class module and a bas. module but program is not reading global variables in class module. is there a compatability problem with having two different modules. if not, what could be the problem. if yoou need code i'll send it.
Printable View
I have a class module and a bas. module but program is not reading global variables in class module. is there a compatability problem with having two different modules. if not, what could be the problem. if yoou need code i'll send it.
How are you accessing the variable? Anyhow consider the following:
1. New Project w/ Form1 and Class1
2. In Class1 code:
option explicit
public bUseDebug as Boolean
3. In Form1 code
private sub Form_Load()
dim oClass as new Class1
debug.print "Debug Flag Before: " & oClass.bUseDebug
oClass.bUseDebug = true
debug.print "Debug Flag After: " & oClass.bUseDebug
end sub
When you run the code you should see FALSE and TRUE printed out in the Immediate Window.
Hope it helps,
-Cool Bizs
all variables were global,but upon a much closer look, something buried deep got switched around in shuffle and needed changed. however i saved your suggestion for future use thank you.