-
hi
i was having problems with my project as it was only working correctly when i had breakpoint in it. Then in the forums it said try using debug.print to resolve this problem and it did!!
however when i made the project into an .exe the problem reapeared!!
(the problem is the program trying to recongnise when certain word are displayed in text boxes)
i have tryed using the DoEvents to try an slow the program down but that has not worked!!
can anyone help or tell me what the problem might be!! i hope this makes sence !!
rgds
Sanj
-
Might it be possible to write a log file from your program.
Since Debug.Print helped you to resolve the problem in code, then maybe a log file might help you when it is compilied.
I also use it to filter out problems I get when a program has problems after being compileid. I always out text in it like I use to make my program readable for others. You know, the green code. Then I also know where the problem is. Mostly there's a way around it.
Good Luck.
-
hi
i have a log file in my program and have tried executing that but it made no difference!
what the program does is send at commands through comm ports! what i am trying to do is captute from the screen when a device sends back a "Connect" the code i am using is:
Private Sub Look_for_Connect_2()
Static EstConnection_Timer As Long
Dim Look_for_CONNECT As Boolean
Dim Wait As Integer
'look for the CONNECT on Comm 2, only wait for 45 seconds once the number has been dialed
If EstConnection_Timer = 0 Then
EstConnection_Timer = Timer + 30# 'set connecttimer to 45 secs
End If
Do
Look_for_CONNECT = txtTerm.Text Like "*CONNECT*"
DoEvents
Debug.Print "look for connect: " & Look_for_CONNECT
If Look_for_CONNECT = True Then
MsgBox "The phone has connected (establish connection end)"
EstConnection_Connected = True
'Exit Sub ' exit the DO-LOOP
End If
DoEvents
If EstConnection_Timer < Timer Then
MsgBox "Did not receive CONNECT (establish connection)", vbExclamation, "ERROR MESSAGE" 'error message
Else:
Debug.Print "waiting: " & Waitingside_Connected & " EstConnect: " & EstConnection_Connected
If Waitingside_Connected And EstConnection_Connected = True Then
Exit Do
Else: Call Look_for_Connect_1
End If
End If
Loop Until EstConnection_Timer < Timer
Call MSComm1_OnComm
End Sub
however when i make it a .exe it does not go in to the "If Look_for_CONNECT = True Then" part of the code!!
pls help