04-08-2011, 05:15 PM
AM using following code snippet
But am getting error Expression expected on line 2 ie is on Add Type. But after removing ":" no error is displayed. But while execution runtime error is occuirng which says: Syntax error.
Will appreciate the response on this.
Thanks.
Code:
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:="a,b,c"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
Will appreciate the response on this.
Thanks.