Closed Thread
Results 1 to 4 of 4

Excel 2007 : Create drop down on click of button and set this drop down to a cell.

  1. #1
    Registered User
    Join Date
    08-31-2010
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    9

    Create drop down on click of button and set this drop down to a cell.

    Hi,
    I am new to programming in Excel.Please help me with the following:

    I have a button in sheet2 .

    1.When i click on the button, i want to create a drop down, populate the drop down
    and set this drop down to cell A1 of sheet1.
    2.Once the cell A1 of sheet1 is set with the drop down, I want to get the value i select from this drop down, in the script.



    Regards,
    Anu

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Create drop down on click of button and set this drop down to a cell.

    Hi,

    Not quite sure what you mean. Are you trying to select from a pre-determined list of values and have your selection in A1. In that case just use the Data Validation List functionality.
    If not why not just enter the Value directly in A1.

    In either case then read your data into a script variable with

    Please Login or Register  to view this content.
    HTH
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    08-31-2010
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Create drop down on click of button and set this drop down to a cell.

    Hi,

    The cell where i want the drop down to appear will be decided dynamically. Its just for a reference that i mentioned A1. Hence, i cant use the data validation list functionality. Also, the list is not predetermined. the values to the list are added dynamically.

    1. I have written an event handler for the button in sheet 2. i have some piece of code inside the handler. after that code, i want to create the drop down,populate it and then assign this drop down to a particular cell, say A1, in sheet1.
    2. once this is done, i will select some value in the drop down. i want to get the value that i have selected from the drop down.

    Please help.

    Regards,
    Anu

  4. #4
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Create drop down on click of button and set this drop down to a cell.

    Duplicate post - see here.
    Remember what the dormouse said
    Feed your head

Closed 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