mahmood24
New Member
- Joined
- Oct 11, 2021
- Messages
- 14
- Office Version
- 2016
- Platform
- Windows
hi dear
i want to replace "=$J$5:$J$9" with a variable hn this code
thanks
code:
With Cells(2.2).Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=$J$5:$J$9"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
i want to replace "=$J$5:$J$9" with a variable hn this code
thanks
code:
With Cells(2.2).Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=$J$5:$J$9"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With