Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 177
Default 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



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default 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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 177
Default 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






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Display a form prior to workbook being displayed pkm Excel Programming 0 February 22nd 06 07:04 PM
Disable Form Events From Being Triggered JGeniti Excel Programming 4 October 14th 05 07:48 PM
TurnOff Form Events ? RAFAAJ2000[_2_] Excel Programming 6 May 29th 05 06:55 PM
keep form displayed JT[_2_] Excel Programming 2 February 24th 05 08:45 PM
Handling Excel Events in a Designer form in an ActiveX DLL Terry Excel Programming 0 October 31st 03 06:04 PM


All times are GMT +1. The time now is 06:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"