Jay
FabulaTech Forum Newbie
Posts: 3
|
|
Excel 2007 VBA -- re-open problem
on: May 3rd, 2010, 7:37am |
Quote Modify
|
Hi, I am evaluating your serial port control, and it looks like it could work well for the data acquisition project that I am working on. However, there are some things that I am encountering that don't make sense to me. One of these problems has to do with opening and closing a serial port. Here is one of the problems I am having: I have placed the control on a UserForm in my Excel 2007 document / VBA project. It is named FTSPCControl1 and has serial port options pre-configured (in IDE). The UserForm also has controls for adjusting the serial port control's settings, closing a port, and opening a port. The first time I open a port (whether using AutoOpen property or using button on UserForm to call Open method), the evaluation message appears and then the port seems to open OK. However, if I then close the port and open it again, the evaluation screen re-appears OK, but then I encounter an error which states, "Run-time error '-2147352567 (80020009)': Method "Open"". I believe this is happening because the port is still open even though the Close method has been called and the IsOpened property reads false. (e.g. if I change to another available port, like COM7, while debugging this error then it continues OK) Thanks in advance for your assistance.
|