View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Howard Kaikow Howard Kaikow is offline
external usenet poster
 
Posts: 269
Default Using an ActiveXDll with Excel 2002 when the DLL uses a VB Form and VBA uses a Userform

I have an Excel workbook in which ALL code is in a class, other than the
code necessary to instantiate the class and load a VBA Userform. I then
compile the class with VB 6 and use the compiled DLL. No problem so far.

But then I got greedy and attempted to try something I've not tried before.

To the VB 6 class, I added a VB Form.
The VB code shows the Form 3 times.
If I make the Form modeless, as expected, all the user sees is the last
display of the Form.
If I make the Form modal, then Excel gets hung waiting for the VB Form to do
its thing each time it is displayed, so using vbModal appears to not work,
and I expected this.

How do I work around this?

Does VB have to get the handle of the VBA Userform and then make sure that
the VB Form gets displayed on top of the VBA Userform?
Or is there an easier way?

--
http://www.standards.com/; Howard Kaikow's web site.
------------------------------------------------