Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would try reversing your code. Load the userform first, set the control
properties, then show the userform. Sub Uncancel_sim() Load Userform1 If Application.UserName = "dresses" Then Userform1.CommandButton2.Visible = False Userform1.Frame4.Visible = False Else Userform1.CommandButton2.Visible = True Userform1.Frame4.Visible = True End If Userform1.Show End Sub Hope this helps! If so, let me know click "YES" below. -- Cheers, Ryan "Basta1980" wrote: Hi, See code below. When I open workbook, click the assigned button userform1 appears & although my username is not dresses frame4 and commandbutton2 are shown. When I close userform1 and then reopen userform1 through the aforementioned button frame4 and commandbutton2 are hidden (like it should). Can anyone help me with this? Sub Uncancel_sim() UserForm1.Show If Application.UserName = "dresses" Then UserForm1.CommandButton2.Visible = False UserForm1.Frame4.Visible = False Else UserForm1.CommandButton2.Visible = True UserForm1.Frame4.Visible = True End If End Sub Regards, Basta1980 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
returning comments propery of a closed file | Excel Programming | |||
Forms Combo Box Invalid Propery Error | Excel Programming | |||
Changing the locked propery of merged cells. | Excel Programming | |||
Print Area propery | Excel Programming | |||
Listbox Propery code | Excel Programming |