+ Reply to Thread
Results 1 to 3 of 3

Formula1 Property of Validation Object to refer to function name

  1. #1

    Formula1 Property of Validation Object to refer to function name

    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


  2. #2
    Greg Lovern
    Guest

    Re: Formula1 Property of Validation Object to refer to function name

    BTW, I tried the code shown in this post, and get error 1004:

    http://groups.google.com/group/micro...function+array


    Thanks,

    Greg


  3. #3
    Greg Lovern
    Guest

    Re: Formula1 Property of Validation Object to refer to function name

    Any suggestions? From the thread referenced in the last post, it sounds
    like this should be possible.

    Thanks,

    Greg


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1