I have several textbox in my form (Cab01, Cab02, Cab03..Cab99) and i'd like to execute the same code for all
Private Sub Cab01_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then PX = X: PY = Y
How could i pass and return the values X,Y without writing 99 times the code?
Something like:
When i click left mouse button on a textbox it will execute a function that will find out what control has the focus so i can use a code like
for x=1 to 99
MsgBox "TextBox: " & Cab(x).Name
next x
Private Sub Cab01_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then PX = X: PY = Y
How could i pass and return the values X,Y without writing 99 times the code?
Something like:
When i click left mouse button on a textbox it will execute a function that will find out what control has the focus so i can use a code like
for x=1 to 99
MsgBox "TextBox: " & Cab(x).Name
next x