Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21273

Resume Next is not working in this case ...

$
0
0
VB6 Code, under Win XP

Private Sub Timer1_Timer()
Dim sTxt As String, L As Long
On Error Resume Next
L = 0
L = Len(Clipboard.GetText)
If L > 1000 Then Call ProcessClipboard
End Sub

Because the timer's interval is one second, a conflict is almost certain. The Clipboard will now and then be busy with another app (copying, pasting, etc).
Unfortunately, "On Error Resume Next" does not work in this case, and THIS app will crash (in my case at least!).
To see what I mean, run and try to paste something repeatedly and rapidly in another app.
Any idea why this error escapes trapping?

Viewing all articles
Browse latest Browse all 21273

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>