I uses records macro from Excel to add a new validation.
I copied the code generated by macro to my function, but it fails.
The code is following:
For i = 19 To iRow
For J = 7 To iCol
With Sheets(wsDestination).Cells(i, J).Validation
.Delete
.Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, _
Operator:=xlBetween, Formula1:="0", Formula2:="100"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
Next J
Next i
I got run time erro 1004
"Unable to get large property of worksheetfunction class"
Bookmarks