Thanks for everyones help so far..
Question: I have Userforms that are displayed by Command Buttons when clicked hides one and shows another
Problem is, else where in the program I have a Maintenance Menu that sets a "maintenance value" to off or on, I have the following code used in the UserForm_Initialize that fires the first time a UserForm loads, but doesnt fire again if the page is re-displayed.
Private Sub CommandButton2_Click()
If I change the Maintenance Option from Off to On, and I have already been on that page, I need the Button to be displayed and same goes if I have already been to the page, see I forgot to turn on the maintenace option, go back turn it on, It won't display the button still, the UserForm_Initialize doesn't fire again..
Private Sub UserForm_Initialize()
MaintOption = Worksheets("Data").Cells(1, 13).Value
If MaintOption = "On" Then
CommandButton4.Caption = "Test Info"
ElseIf MaintOption = "Off" Then
CommandButton4.Caption = ""
CommandButton4.Enabled = False
Any ideas on what to change ?