HI,
I have a ComboBox1 has populate other textbixes etc on a userform. The user then has the option to edit the existing data (CommandButton1) or Create new data (CommandButton2).
If there is nothing entered into ComboBox1 then I would like to hide CommandButton1 from my form. Is this possible?
I have tried some code but cannot get it working:
Private Sub UserForm_Initialize()
Dim ws As Worksheet
With Me.Controls("CommandButton2")
If mename.Value = "" Then
.Visible = False
Else
.Visible = True
End If
End With
This hides the button but doesn't show it when text is entered into ComboBox1 (mename)
Thank you in advance
Bookmarks