Hello, I have this code to enable and change font of multiple textboxes based on one condition. However I'd like to add a condition and I don't know how to write this to make sense in my code. If you can help me it would be great.
thanks for your time
thanks for your time
VBA Code:
Private Sub Reg351_Change()
Dim ind As Long
For ind = 446 To 485
Controls("Reg" & ind).Enabled = Controls.Item("Reg351").Text = "condition1" 'I'd like to add condition2 here
Controls("Reg" & ind).BackColor = IIf(Controls.Item("Reg351").Text = "condition1", "&H80000005", "&H80000004") 'I'd like to add condition2 here
Next ind
End Sub