View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mikhail Mikhail is offline
external usenet poster
 
Posts: 9
Default Same event procedure for multiple controls

I have a userform with 18 TextBoxes. Their values are read from a worksheet.
On KeyPress event I write data back to worksheet.
Is it possible to write a procedure which accepts textbox control as
parameter as runs the same On_KeyPress sub for all 18 TextBoxes?
Or may be when KeyPress event is occurred on a form, is it possible to
determine which TextBox is active and do necessary actions on this TextBox?

Thanks in advance, Mike510