Hi,
I'm trying to automatically update the list of items for data validation in multiple cells. Since I wasn't sure how to access data validation, I just quickly recorded a macro, and worked off that code. When I try to run the code I came up with I get the following error:
"Run-time error '-2147417848 (80010108)':
Automation error
The object invoked has disconnected from its clients."
I have two sheets in my workbook and i am copying data from one sheet to other in some other part of the code. Can anyone help me.
Cells(57 ,4).Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="true,false"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = " "
.ErrorTitle = " "
.InputMessage = " "
.ErrorMessage = " "
.ShowInput = True
.ShowError = True
End With
Thanks in advance,
Ogo
I'm trying to automatically update the list of items for data validation in multiple cells. Since I wasn't sure how to access data validation, I just quickly recorded a macro, and worked off that code. When I try to run the code I came up with I get the following error:
"Run-time error '-2147417848 (80010108)':
Automation error
The object invoked has disconnected from its clients."
I have two sheets in my workbook and i am copying data from one sheet to other in some other part of the code. Can anyone help me.
Cells(57 ,4).Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="true,false"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = " "
.ErrorTitle = " "
.InputMessage = " "
.ErrorMessage = " "
.ShowInput = True
.ShowError = True
End With
Thanks in advance,
Ogo