Quote Originally Posted by clarkgriswald
VB Code:
  1. Private Sub Timer1_Timer()
  2.  
  3.     Dim lProcessID As Long
  4.     Dim lID As Long
  5.    
  6.     Timer1.Interval = 0
  7.    
  8.     'get the process ID for prosper
  9.     lProcessID = GetWindowThreadProcessId(Me.hWnd, lID)
  10.    
  11.     'close any open message boxes
  12.     CloseMessageBox lProcessID
  13.    
  14.     Form2.Show   '<----- DANGER, WILL ROBINSON, DANGER
  15.  
  16. End Sub
My shot in the dark would be the Form2.Show call in the timer loop is directly causing the error. If you call CloseMessageBox and it doesn't successfully close the MsgBox, then then it will try to show Form2 and blow up.

Have you stepped through your code and made sure that it is closing the MsgBox where and when it should be closing?