is it possible? (easy question)

kalicinski

New member
Local time
Today, 17:57
Joined
Jul 16, 2001
Messages
9
Is it possible to use a variable when setting a control property of an object?
(ie. Me.Visible=false --> replace "Me" with variable for FormName to be hidden)

i've tried to guess at the syntax, but nothing's worked so i'm thinking it's not possible. And Help doesn't mention it that i can find.

tks,
 
if the name of the form is in a variable, you can write it this way:

Forms(CStr(VariableName)).Visible = False

i use CStr just to force the return type of the variable to string.
 
thanks! that worked awesome!
 

Users who are viewing this thread

Back
Top Bottom