Hi all,
I get an run-time error 1004 in the code below in row: If rCell.Validation.Formula1 = "EUR" Then
Can somebody help me?
Sub test()
Dim rCell As Range
If Selection.Cells.Count = 1 Then
MsgBox "Select the range to be processed."
Exit Sub
End If
For Each rCell In Selection
If rCell.Validation.Formula1 = "EUR" Then
rCell.Validation.Delete
rCell.Validation.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:="=ListCurrency"
End If
Next rCell
End Sub
I get an run-time error 1004 in the code below in row: If rCell.Validation.Formula1 = "EUR" Then
Can somebody help me?
Sub test()
Dim rCell As Range
If Selection.Cells.Count = 1 Then
MsgBox "Select the range to be processed."
Exit Sub
End If
For Each rCell In Selection
If rCell.Validation.Formula1 = "EUR" Then
rCell.Validation.Delete
rCell.Validation.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:="=ListCurrency"
End If
Next rCell
End Sub