Thread
:
Dropd Down (validation: list) on the fly with a code - a problem
View Single Post
#
2
Posted to microsoft.public.excel.programming
papou[_4_]
external usenet poster
Posts: 110
Dropd Down (validation: list) on the fly with a code - a problem
Hi AB
Use the comma separator instead, eg:
xlBetween, Formula1:="1,2"
HTh
Cordially
Pascal
"AB" a écrit dans le message de news:
...
Hi,
I was hoping if anyone could help me - i'm trying to write a code that
would create a dropdown in a cell on the fly. That's the simple code:
With Selection.Validation
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop,
Operator:= _
xlBetween, Formula1:="1;2"
.InCellDropdown = True
End With
So far so good, but the problem is that i want the dropdown to let the
user enter either 1 or 2 but if i run the above code then the dropdown
lets the user enter only one value = "1;2".
In the meantime if i enter the same list ("1;2") manualy into the
validation (Datavalidation - i.e., don't do it with a code) - then
everything is fine - i.e., the dropdown offers either value ("1" or
"2") and not the combined ("1;2").
The point is that i'll need to define the dropdown lists on the fly
and they'll constantly change, that's why i wanted to do that with a
code.
Any help would be greatly appreciated.
Thanks!
Reply With Quote
papou[_4_]
View Public Profile
Find all posts by papou[_4_]