![]() |
No events in form displayed from callback routine
I have a bit of a weird problem which I wonder if anybody has any thoughts
on? My VBA code (XL97 - XL2003) sometimes makes calls to a VB dll. Under certain circumstances, the VB code will then callback into the VBA code. Under even rarer circumstances, this VBA code will display a form. The form is quite simple. It has a textbox and a command button. The command button click event handler for the form simply Hide's the Form. This dialog works just fine normally (that is when its displayed by "regular" VBA code). However, when it displayed by the callback code described above, then clicking the command button on the form doesn't raise the command_Click event. In fact, when displayed via the callback code, none of the controls on the form are able to raise events. The only thing on the form that seems to work is the little X button in the upper right corner which does correctly dismiss the dialog. Any thoughts on how to make this work? TIA, josh |
No events in form displayed from callback routine
I think the simple answer is to redo your UserForm in the current VBA version.
"Josh Sale" wrote: I have a bit of a weird problem which I wonder if anybody has any thoughts on? My VBA code (XL97 - XL2003) sometimes makes calls to a VB dll. Under certain circumstances, the VB code will then callback into the VBA code. Under even rarer circumstances, this VBA code will display a form. The form is quite simple. It has a textbox and a command button. The command button click event handler for the form simply Hide's the Form. This dialog works just fine normally (that is when its displayed by "regular" VBA code). However, when it displayed by the callback code described above, then clicking the command button on the form doesn't raise the command_Click event. In fact, when displayed via the callback code, none of the controls on the form are able to raise events. The only thing on the form that seems to work is the little X button in the upper right corner which does correctly dismiss the dialog. Any thoughts on how to make this work? TIA, josh |
No events in form displayed from callback routine
I guess I wasn't clear ... the UserForm is a VBA form. The form works fine
when displayed by what I described as "regular" VBA code but its controls fail to raise events when displayed from calledback VBA code. VBA-UserForm works OK VBA-VB-VBA-UserForm doesn't work OK josh "JLGWhiz" wrote in message ... I think the simple answer is to redo your UserForm in the current VBA version. "Josh Sale" wrote: I have a bit of a weird problem which I wonder if anybody has any thoughts on? My VBA code (XL97 - XL2003) sometimes makes calls to a VB dll. Under certain circumstances, the VB code will then callback into the VBA code. Under even rarer circumstances, this VBA code will display a form. The form is quite simple. It has a textbox and a command button. The command button click event handler for the form simply Hide's the Form. This dialog works just fine normally (that is when its displayed by "regular" VBA code). However, when it displayed by the callback code described above, then clicking the command button on the form doesn't raise the command_Click event. In fact, when displayed via the callback code, none of the controls on the form are able to raise events. The only thing on the form that seems to work is the little X button in the upper right corner which does correctly dismiss the dialog. Any thoughts on how to make this work? TIA, josh |
All times are GMT +1. The time now is 01:31 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com