benjamin.weizmann
Registered User.
- Local time
- , 19:37
- Joined
- Aug 30, 2016
- Messages
- 78
hi , I have this sub:
Private Sub mach_2_AfterUpdate()
If Me.ex2 .value= 99999 And Not Me.mach_2.Value = 0 Then
If msgzeropro = 0 Then
Me.mach_2.Value = 0
Exit Sub
Else
Me.ex2.Value = msgzeropro
End If
End If
Call colordec(2)
End Sub
when msgzeropro and colordec are functions
this sub create kind of loop
cause in the first .. the user update the txtbox and call sub((1))
and in accordance condition , the sub update the textbox and call itself ((2))
how can I avoid ((2))??
I thought some ideas like static variable (but I have some txtbox with same sub) - so, I can not wait to hear your creativeness

thanks
Ben
thanks u
Private Sub mach_2_AfterUpdate()
If Me.ex2 .value= 99999 And Not Me.mach_2.Value = 0 Then
If msgzeropro = 0 Then
Me.mach_2.Value = 0
Exit Sub
Else
Me.ex2.Value = msgzeropro
End If
End If
Call colordec(2)
End Sub
when msgzeropro and colordec are functions
this sub create kind of loop
cause in the first .. the user update the txtbox and call sub((1))
and in accordance condition , the sub update the textbox and call itself ((2))
how can I avoid ((2))??
I thought some ideas like static variable (but I have some txtbox with same sub) - so, I can not wait to hear your creativeness

thanks
Ben
thanks u