View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Richard Richard is offline
external usenet poster
 
Posts: 709
Default Pass the variable into the sub function

Hello,

Hope some can help me here.

As you can see the example below, I want to write the Sub function only once
and able to run the sub function based which txtbox has been updated by a
user.

Assume X is the variable of the text box.

Can you help me to update "Private Sub txtbox"X"_AfterUpdate()" code, please?

Thank you for your help and time.

Example I have 10 text boxes, txtbox1, txtbox2, txtbox3,.....txtbox9, and
txtbox10.

Private Sub txtbox"X"_AfterUpdate()

intLnumber = X ' I want to run some coding here based which txtbox has
been updated.

End Sub