Create a activecell from the listbox?
On the form you presumably have an ok or goto button (here CommandButton1)
and a the double_click event for the list box (here ListBox1).
Set up these three sub as try it would assuming you have a the two controls.
Private Sub CommandButton1_Click()
ActiveSheet.Range(ListBox1.Value).Select
Me.Hide
Unload Me
End Sub
Private Sub ListBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
CommandButton1_Click
End Sub
Private Sub UserForm_Initialize()
ListBox1.AddItem "A1"
ListBox1.AddItem "B2"
ListBox1.AddItem "C3"
End Sub
--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.
"Oggy" wrote:
Hi
Does anyone have a code for making my selection in a listbox on a form
my activecell in the worksheet.
Thanks in advance
|