+ Reply to Thread
Results 1 to 11 of 11

Making a window pop when selecting from drop down

  1. #1
    Forum Contributor
    Join Date
    10-28-2010
    Location
    quebec, canada
    MS-Off Ver
    o365
    Posts
    187

    Making a window pop when selecting from drop down

    Hi everyone,

    I want to make 1 script, but not too sure how.

    I wish to do it a certain way (see example 1), but if it is impossible, then (example 2) can be ok.

    Example 1:
    When i select an item from a drop down menu, item is called "Activation - New sales approval", a window will pop asking for BAN number and Order number, and in the window you type in the 2 info, and when you click ok, it goes straight in the comments of the cell.

    Example 2:
    When i select an item from a drop down menu, a window pop, advising to leave information in the comments of the drop down. And people will go in the cell manually and insert the comment.

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Making a window pop when selecting from drop down

    xatomicx,

    Attached is an example workbook based on the criteria described (using example 1). The VBA code it contains is in the Sheet1 module of the VBE. The code is a Worksheet_Change event:

    Please Login or Register  to view this content.


    Is something like that what you're looking for?
    Attached Files Attached Files
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Contributor
    Join Date
    10-28-2010
    Location
    quebec, canada
    MS-Off Ver
    o365
    Posts
    187

    Re: Making a window pop when selecting from drop down

    This is absolutely perfect.

    i mean.. wow.

    Can't thank you enough!

  4. #4
    Forum Contributor
    Join Date
    10-28-2010
    Location
    quebec, canada
    MS-Off Ver
    o365
    Posts
    187

    Re: Making a window pop when selecting from drop down

    weird, my file doesnt want to consider the VBA script.

    i change the cell reference to "c1:c2500", is there anything else in your script else than cell value that i need to adapt?

    The "activation - New sales approval" can be picked on 7 of my worksheets, on cell c1:c2500 of all 7 sheets.

    I wish i could post my workboot, but it's 2mb. i'll see if i can chop part of it.

  5. #5
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Making a window pop when selecting from drop down

    xatomicx,

    Because this can happen in all 7 sheets, use the Workbook_SheetChange event, located in the ThisWorkbook code module (instead of the Sheet1 code module). The code would be:
    Please Login or Register  to view this content.
    Last edited by tigeravatar; 04-24-2012 at 01:47 PM.

  6. #6
    Forum Contributor
    Join Date
    10-28-2010
    Location
    quebec, canada
    MS-Off Ver
    o365
    Posts
    187

    Re: Making a window pop when selecting from drop down

    Alright,

    the Script works, and my folks started using it this morning, and we're experiencing a loop.

    Once we select " Activation - New sales approval " the window pop, asking the info, and put them in the comments, and it's fine. But after that, wherever drop down or input we do in the rest of the page, makes the window pop again, asking the same info. can we make the script turn off once the data as been entered?

  7. #7
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Making a window pop when selecting from drop down

    I created a test workbook, and it only popped the windows asking for ban and order numbers when "Activation - New sales approval" was selected from C1:C2500 in any worksheet. Making a change in any other cell, or changing any cell in C1:C2500 to anything other than that exact phrase did not cause the pop-up windows. Are you saying you only want the pop-up windows the first time "Activation - New sales approval" is selected per sheet, and not again after that?

  8. #8
    Forum Contributor
    Join Date
    10-28-2010
    Location
    quebec, canada
    MS-Off Ver
    o365
    Posts
    187

    Re: Making a window pop when selecting from drop down

    Quote Originally Posted by tigeravatar View Post
    I created a test workbook, and it only popped the windows asking for ban and order numbers when "Activation - New sales approval" was selected from C1:C2500 in any worksheet. Making a change in any other cell, or changing any cell in C1:C2500 to anything other than that exact phrase did not cause the pop-up windows. Are you saying you only want the pop-up windows the first time "Activation - New sales approval" is selected per sheet, and not again after that?
    I will post part of my workbook so you can experience the loop.
    I want it to pop once, if the topic "Activation - New sales approval" is selected. Many other topic can be selected, but when this one is selected, i want it to ask for the info, each time this topic is selected.

    Now what we are experiencing is, if i select this topic, and put the info in, and continue puting whatever in the page, it will ask for it again.

    Give me a min, i'll post the workbook, i need to clear up some stuff in it, it's a bit heavy

  9. #9
    Forum Contributor
    Join Date
    10-28-2010
    Location
    quebec, canada
    MS-Off Ver
    o365
    Posts
    187

    Re: Making a window pop when selecting from drop down

    HT tracker Test.xls

    Its all drop down, go in amelie, pick the first name in the list, second row pick "core", third row pick "activation new sales approval", 4th row valid, and so on, its all drop down you have to pick in order.

  10. #10
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Making a window pop when selecting from drop down

    xatomicx,

    I see the problem, you have a bad range reference. This should fix it:
    Please Login or Register  to view this content.

  11. #11
    Forum Contributor
    Join Date
    10-28-2010
    Location
    quebec, canada
    MS-Off Ver
    o365
    Posts
    187

    Re: Making a window pop when selecting from drop down

    Quote Originally Posted by tigeravatar View Post
    xatomicx,

    I see the problem, you have a bad range reference. This should fix it:
    Please Login or Register  to view this content.
    Works fine! :D
    Thank youuuuuuuuuuuuuu

+ 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