I am trying to set validation on a cell that resides in a "different" workbook than the workbook containing the module. The following code gives the error message - "Application-defined or Object-defined error" - 1004.
Any idea what is wrong with this code?:
With Workbooks("Test.xls").Sheets("Sheet1").Cells(2, "BB").Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=ValList"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = "Note"
.ErrorTitle = ""
.InputMessage = _
"Please select a category & then choose an option from brief break detail column."
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
Thanks and regards...
Any idea what is wrong with this code?:
With Workbooks("Test.xls").Sheets("Sheet1").Cells(2, "BB").Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=ValList"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = "Note"
.ErrorTitle = ""
.InputMessage = _
"Please select a category & then choose an option from brief break detail column."
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
Thanks and regards...