Hi All,
Does anyone know how to disable different parts of a userform?
I dont really want to go through each control as I reckon it will be handy code to have in the future if I need to add more but so far my code is:
Private Sub UserForm_Activate()
With Sheet2
n = 3
Do
If .Cells(n, 8) = "Completed" Then
Me.ComboBox4 = .Cells(n, 9)
me.combobox1.enabled=false
me.combobox2.enabled=false
me.combobox3.enabled=false
me.combobox4.enabled=false
me.dtpicker1.enabled=false
me.dtpicker2.enabled=false
End If
n = n + 1
Loop Until .Cells(n, 7) = ""
End With
End Sub
Thanks in advance
Michael
Does anyone know how to disable different parts of a userform?
I dont really want to go through each control as I reckon it will be handy code to have in the future if I need to add more but so far my code is:
Private Sub UserForm_Activate()
With Sheet2
n = 3
Do
If .Cells(n, 8) = "Completed" Then
Me.ComboBox4 = .Cells(n, 9)
me.combobox1.enabled=false
me.combobox2.enabled=false
me.combobox3.enabled=false
me.combobox4.enabled=false
me.dtpicker1.enabled=false
me.dtpicker2.enabled=false
End If
n = n + 1
Loop Until .Cells(n, 7) = ""
End With
End Sub
Thanks in advance
Michael