sirbounty
asked on
my text_Change runs twice...how can I stop this?
Inside that routine, I have something along the lines of
If instr(1,txtinfo(1).text, "A")) =0 and instr(1,txtinfo(1).text, "B")) =0 Then
txtInfo(1).text = "A" & txtinfo(1).text
blah blah blah of course change runs again - not a biggie as the code runs okay, but pointless nonetheless...
If instr(1,txtinfo(1).text, "A")) =0 and instr(1,txtinfo(1).text, "B")) =0 Then
txtInfo(1).text = "A" & txtinfo(1).text
blah blah blah of course change runs again - not a biggie as the code runs okay, but pointless nonetheless...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
sirbounty,
my mistake...
If (Not Running) And (InStr(1,txtinfo(1).Text, "A") =0) And (InStr(1,txtinfo(1).Text, "B") =0) Then
my mistake...
If (Not Running) And (InStr(1,txtinfo(1).Text, "A") =0) And (InStr(1,txtinfo(1).Text, "B") =0) Then
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
AzraSound,
Yes.. of course... it will prevent the appending of "A" which is the main requirement here. :)
Yes.. of course... it will prevent the appending of "A" which is the main requirement here. :)
Didn't read what he was doing...a boolean would work okay here (or maybe you can do your handling in another event).
ASKER
Hey guys - good info above. just want to detail what I'm doing...
User will copy a number from another program. I want that when it's pasted to my form, it'll be preceeded with an "A" if not already (the originating number doesn't have the "A", but some folks add it before pasting it).
Anyway - I'm going to close this one - I've found another bug that is going to basically eliminate this as an issue anyway...thanx for the input. :^)
User will copy a number from another program. I want that when it's pasted to my form, it'll be preceeded with an "A" if not already (the originating number doesn't have the "A", but some folks add it before pasting it).
Anyway - I'm going to close this one - I've found another bug that is going to basically eliminate this as an issue anyway...thanx for the input. :^)
You are changing it withing _Change event
Bye
---
Harish