Good afternoon. I have created a Userform - "Form1" - that contains 2 x Combo boxes - "MonthComboBox" & "WeekComboBox", 2 x text boxes (effectively labels) and 1 x Command Button - called "Rename". This form is 'called' from a button on the workbook that just runs the code:
My colleague came up with the idea (just now!) of putting this in the "ThisWorkbook" module:
And then these behind the Combo boxes:
Does this sound like a good approach? I had thought of just disabling the button via its properties.
Many thanks,
D€$
Code:
Form1.Show
My colleague came up with the idea (just now!) of putting this in the "ThisWorkbook" module:
Code:
Form1.Rename.Enabled = False
And then these behind the Combo boxes:
Code:
Private Sub MonthComboBox_Change()
If Form1.MonthComboBox.Text <> "" And Form1.WeekComboBox.Text <> "" Then
Form1.Rename.Enabled = True
Else
Form1.Rename.Enabled = False
End If
End Sub
Private Sub WeekComboBox_Change()
If Form1.MonthComboBox.Text <> "" And Form1.WeekComboBox.Text <> "" Then
Form1.Rename.Enabled = True
Else
Form1.Rename.Enabled = False
End If
End Sub
Does this sound like a good approach? I had thought of just disabling the button via its properties.
Many thanks,
D€$