Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In Excel 2003, how do I get the Formula1 property of the Validation
object to refer to a function name? This gives me error 1004: Sub Macro1() With Selection.Validation .Delete '.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _ xlBetween, Formula1:="=$A$15:$A$19" 'recorded my macro recorder, works fine. .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _ xlBetween, Formula1:=GetList .IgnoreBlank = True .InCellDropdown = True .InputTitle = "" .ErrorTitle = "" .InputMessage = "" .ErrorMessage = "" .ShowInput = True .ShowError = True End With End Sub Public Function GetList() Dim arrayList(1 To 5) As String arrayList(1) = "aaa" arrayList(2) = "ccc" arrayList(3) = "bbb" arrayList(4) = "ddd" arrayList(5) = "eee" GetList = arrayList End Function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Possible to refer to a sheet's object name ? | Excel Worksheet Functions | |||
How do I use the .Cells property to refer to ActiveCell? | Excel Discussion (Misc queries) | |||
More then 1 Excel object running at same time , how can I refer to right one in code? | Excel Programming | |||
refer to the sheets Name property in my code (not what is on the Tab) | Excel Programming | |||
"Select Column method or property not available because some/all of object doesn't refer to table" | Excel Programming |