![]() |
Unloading userform in MSComm event
Hi,
I'm using the MSComm function to communicate with a microprocessor. Everything works fine except for one thing: at the end of my MSComm_OnComm() sub, I prompt a simple message box, and after that message box, I want to close the form (which has the MSComm control on it). Whenever I include the Unload userform line after the message box line, I get an error (actually, the entire VB shuts down and an error log is created). Of course when I don't use Unload userform, everything works fine. The microprocessor is not sending any data at the time either. It seems the error is occuring because the userform is closing before the MSComm control has stopped. What's going on here? Any help would be appreciated. Thanks. Sunny |
All times are GMT +1. The time now is 12:22 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com