Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Modeless userform OLEObject Add problem

Hi Peter,

That makes sense.
However, the same problem works fine if the Userform is modal. I
suspect it could be some other issue wrt Userforms

I am also curious as to how you circumvented the problem of the global
variables being reset in the related issue you mentioned.

Thanks,
Jayant


Yes it's strange it works OK if the Userform is modal, I would have expected
the opposite and more likely to work with a modeless form.

However I'm curious as to why it appears to work for Bob. With me the new
button gets added then all code and the form terminates, leaving a memory
leak. Maybe it's a version thing, I'm using xl2K.

I joined mid way in the thread I referred to, which related to adding
ActiveX controls to a worksheet, and in particular the Activesheet (though
not from code in a userform). I looked from several angles and was
surprised at what would and would not work. In other words adding new
controls doesn't necessarily recomiple the project (or at least not the
entire project), even when adding controls on the active sheet. But when
things failed I didn't circumvent the problem of globals being reset.

I posted back some of these "mysteries" and Stephen Bullen replied thus:

"Or to put it another way - even if I did find out why it works in some
cases and not others, I still wouldn't trust it in a production app."

For your immediate needs I would suggest adding new Forms' controls instead
of new ActiveX's.

Regards,
Peter T



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
Modeless userform hngo New Users to Excel 2 July 13th 05 09:23 AM
Modeless Userform problem Harald Staff Excel Programming 1 September 3rd 04 06:28 PM
Modeless Userform problem Robin Hammond[_2_] Excel Programming 0 September 2nd 04 02:29 PM
modeless userform jacob Excel Programming 1 May 4th 04 02:53 PM
Modeless userform jacob[_3_] Excel Programming 2 September 29th 03 08:02 PM


All times are GMT +1. The time now is 09:22 AM.

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"