Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dear all experts,
I create a named validation list called "chuen_PN" via marco recording on worksheet1 with the similar code like following: ....... Range("A1:C12").Select With Selection.Validation .Delete .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _ xlBetween, Formula1:="=chuen_PN" .IgnoreBlank = True .InCellDropdown = True ...... ...... ...... Remark * ( soruce of chuen_PN is in different worksheet of the same workbook ..) Now I want to use VBA code to point the range instead of the named (chuen_PN) , but it's failed when I change the code like following.. ...... .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _ xlBetween, Formula1:="worksheet(index).range("A1:A12")" .IgnoreBlank = True .InCellDropdown = True ...... Can I define a range by VBA code (worksheet(index).range......) in validation list here? Thanks all |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Data validation list using filtered range | Excel Discussion (Misc queries) | |||
Data Validation - List - Setting Range from a macro | Excel Discussion (Misc queries) | |||
Question about range in validation list | Excel Discussion (Misc queries) | |||
Edit validation list range | Excel Discussion (Misc queries) | |||
data validation list selected from a range | Excel Discussion (Misc queries) |