View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Displaying data in user form from active worksheet

Private Sub Userform_Initialize()
if activecell.column < 1 then
Textbox1.Value = activecell.offset(0,-1).value
End if
End sub

If you want it more sophisticated than that, you would have to make a public
variable declared in a general module to hold a reference to target (set in
the selectionchange event) and accessed by the userform in the initialize or
activate event.

--
Regards,
Tom Ogilvy

"Barb Reinhardt" wrote:

I have a worksheet selection change event that calls a user form. Within the
user form, I want to display the value that is one column to the left of the
cell that is selected. How would I do that?

Thanks