+ Reply to Thread
Results 1 to 4 of 4

Excel Form Drop Down doesn't retain value

  1. #1
    Registered User
    Join Date
    09-23-2007
    Posts
    54

    Excel Form Drop Down doesn't retain value

    Hi folks,

    I need to use a Form control - a drop down, not the ActiveX combobox. I load the drop down using AddItem, make a selection from the list, save and close excel, and reopen execl. The chosen value is not there, but the list items are remembered (despite me not re-initializing the list upon opening the book). I just need whatever item the user last selected after he saved the book to remein selected upon open.

    Is that possible with the Drop Down Form control?

    Thanks a lot.

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Excel Form Drop Down doesn't retain value

    yes if you use a link cell (you can also populate the control in a similar way rather than using additem)
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Registered User
    Join Date
    09-23-2007
    Posts
    54

    Re: Excel Form Drop Down doesn't retain value

    I'm trying to populate the Form drop down with the following, but nothing is showing up:

    With Worksheets("plots")
    lastcol = Worksheets("data").Range("A4").End(xlToRight).Column
    With Worksheets("data")
    Set SourceRng = .Range(.Cells(4, 1), .Cells(4, lastcol))
    End With
    comboArray = WorksheetFunction.Transpose(SourceRng)
    .Shapes("Drop Down 64").ControlFormat.InputRange comboArray.Value
    End With

  4. #4
    Registered User
    Join Date
    09-23-2007
    Posts
    54

    Re: Excel Form Drop Down doesn't retain value

    Oh, forgot an = sign:

    Worksheets("plots").Shapes("Drop Down 64").ControlFormat.List = comboArray

    Then it works.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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