View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Reference varialble value rather than variable name

Dim ShingleList As String
ShingleList = "B52:B55"
Range("InptShingleType").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=
_
xlBetween, Formula1:="=ShingleList"
.IgnoreBlank = True
.InCellDropdown = True
.ShowInput = True
.ShowError = True
End With


--

HTH

RP
(remove nothere from the email address if mailing direct)


"r wilcox" wrote in message
...
I'm trying to change the list in a data validation box with the following,
but instead of a list range in the dropdown box, I get the name of the
variable, "ShingleList" , that contains the list. Can anyone suggest a way
around it?

Dim ShingleList As String
ShingleList = "B52:B55"
Range("InptShingleType").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop,

Operator:= _
xlBetween, Formula1:="ShingleList"
.IgnoreBlank = True
.InCellDropdown = True
.ShowInput = True
.ShowError = True
End With