No events in form displayed from callback routine

J

Josh Sale

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
 
J

Josh Sale

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top