Results 1 to 2 of 2

Excel VBA Macro to create a drop down list

Threaded View

jeffgraser Excel VBA Macro to create a... 12-23-2009, 07:48 PM
Leith Ross Re: Excel VBA Macro to create... 12-23-2009, 08:08 PM
  1. #1
    Registered User
    Join Date
    12-23-2009
    Location
    Arizona, US
    MS-Off Ver
    Excel 2003
    Posts
    1

    Excel VBA Macro to create a drop down list

    I have an excel macro that creates a validation drop down list. It does basically what I want but I would really like it to get the drop down list values from cells in another workbook. Right now it get the list from within the Macro therefore it is a fixed list that you have to edit the macro to change. Here is what it looks like now.
    With Selection.Validation
            .Delete
            .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
            xlBetween, Formula1:="ALARM,AMER,CANTEEN,CHALK,CINTAS,CTYWTR,HILLYARD,HUNTER,SAFETYK,SAGUENV,SAGVENT,TEP,TUCSAFETY,WESTLAKE"
            
            .IgnoreBlank = True
            .InCellDropdown = True
            .InputTitle = ""
            .ErrorTitle = ""
            .InputMessage = ""
            .ErrorMessage = ""
            .ShowInput = True
            .ShowError = True
        End With
    I want to be able to get a list from a file called Vendor.xls, in sheet 1 from cells A1:A30.

    Or even if it could be pulled from a list in a different worksheet within the active workbook.

    Any help would be greatly appreciated.
    Last edited by jeffgraser; 12-26-2009 at 01:58 PM. Reason: Added Code Tags

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