PDA

View Full Version : Userform Question



andytpl
08-16-2007, 12:55 AM
Is it possible to activate a Userform whenever a certain cell is selected. If it is possible how would the codes look like.

Bob Phillips
08-16-2007, 01:02 AM
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$H$1" Then UserForm1.Show
End Sub


This is worksheet event code, which means that it needs to be
placed in the appropriate worksheet code module, not a standard
code module. To do this, right-click on the sheet tab, select
the View Code option from the menu, and paste the code in.

andytpl
08-16-2007, 04:20 AM
I have created the Userform with a combo-box link to a name range consisting of data from 2 columns. The selected item in Column A in the listbox will be then input into the selected cell in the worksheet while Column B is some remarks to explain the selection the content in Column A. I defined a name (Impact) and this is type into the "Rowsource" of the ListBox1 properties tab.
The question now is how will the quote be like to allow the selected item from the Userform be input to the active cell? Please help