Vba-Set control visibility by vba

arage

Registered User.
Local time
Today, 03:17
Joined
Dec 30, 2000
Messages
537
Vba-Set control visibility by vba
Can someone recommend vba code that sets the visibility property of a control to visible or invisible? Basically I want to say if the user type is a director then make the button A invisible.
Thanks!
 
You can use the "visible" property to show or hide things, but you may also want to disable a control at the same time. Try something like this:

if usertype = "x" then 'or whatever the value should be
me.btnA.Visible = true
me.btnA.Enabled = true
else
me.btnA.Visible = false
me.btnA.Enabled = false
end if
 
thanks Chris! i just disabled it what the heck.
 

Users who are viewing this thread

Back
Top Bottom