View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Nigel[_2_] Nigel[_2_] is offline
external usenet poster
 
Posts: 735
Default Set Cell value form ListBox.

If the ListBox is on a UserForm then use the UserForm control change event
to populate the currently selected cell and unload the UserForm. Code is in
the UserForm

Private Sub ListBox1_Change()
ActiveCell = ListBox1.Value
Unload Me
End Sub


--

Regards,
Nigel




"eme" wrote in message
...


Thanks for your response Nigel,

Sorry I was not clear, what I am looking for is the automatic
Close/Cancel of the ListBox & UserForm after the selection is made.
Something like ListBox.Close & UserForm.Close.

I am migrating this VB code form Lotus.123 where it works fine.