none
How to display a simple UserForm and push the item selected back to a worksheet RRS feed

  • Question

  • Hi,

    I am a novice at vba but can usually get around by researching other peoples code but at this point, I am having great difficulty addressing the functionality I am looking for. Here are the details and assumptions;

    I have listed 5 colors (red, blue, green, yellow and brown) is Sheet2 between A1 and A5 and called that range "colors".

    In Sheet 1 column A, I have a series of questions for the user to answer. The answers should go in Columns B.

    What I desire is the following, upon the user selecting any cell in Column B, a UserForm to pop-up containing the list of acceptable colors and have the user selection returned to the active cell.

    The example is simplistic in nature and can be easily done using data validation so pardon for seeming to make things more complicated than they should. The actual use case is a bit more complicated but I should be able to adjust the code to fit my needs.

    Any help is appreciated. Thank you very much!

    Tuesday, May 17, 2016 8:54 PM

Answers

  • Hi AZ,

    >> What I desire is the following, upon the user selecting any cell in Column B, a UserForm to pop-up containing the list of acceptable colors and have the user selection returned to the active cell.

    Which step do you have issues? Could you design a UserForm or show up UserForm when you change values in cell in column B? It would be helpful if you could share us what you have done and which step you do not know how to do.

    For showing a UserForm when cell values change, you could try a simple code below:

    Private Sub Worksheet_Change(ByVal Target As Range)
    'MsgBox "Worksheet_Change"
     UserForm1.Show
    End Sub

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Wednesday, May 18, 2016 6:59 AM