T
tjb
Below is my code (that doesn't work) for a combo box.
When the user selects U.S. Postal Service from the combo
box named ShipVia and Home from the combo box named
ShipTo I want to gray out the cell named Address1. My
code doesn't seem to do it and I don't see what's wrong.
Thanks!
Private Sub ShipVia_Change()
'disables section 7 if USPS and Home selected
If Sheets("Request Form").ShipVia.Value = "U.S.
Postal Service" And Sheets("Request Form").ShipTo.Value
= "Home"
Then Range("Address1").Activate
With Selection.Interior
.ColorIndex = 16
.Pattern = xlSolid
End With
Exit Sub
End If
End Sub
When the user selects U.S. Postal Service from the combo
box named ShipVia and Home from the combo box named
ShipTo I want to gray out the cell named Address1. My
code doesn't seem to do it and I don't see what's wrong.
Thanks!
Private Sub ShipVia_Change()
'disables section 7 if USPS and Home selected
If Sheets("Request Form").ShipVia.Value = "U.S.
Postal Service" And Sheets("Request Form").ShipTo.Value
= "Home"
Then Range("Address1").Activate
With Selection.Interior
.ColorIndex = 16
.Pattern = xlSolid
End With
Exit Sub
End If
End Sub