Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 593
Default UserForm usage

keepITcool wrote:
I'm not sure your code is very efficient: Passing the form byval
creates 2 instances of the interface class (both in the caller and in
the callee).


Worse the unreferenced object created in the caller doesn't get
released until the project ends e.g. press the reset button in the VBE
or re-using the global instance of userform1 :-( Of course, passing
ByRef makes no difference.

Since you're not really using the interface class object, I think
passing a string is more logical.


I guess I'd reluctantly go for the latebound call using Object.
However, I think if the OP's has a genuine need for a generic routine
to show a userform (rather than merely posing an interesting
theoretical question), I would expect them to prefer the classname as
a string in the Userforms.Add method. I can't quite see it - element
names stored in a database, perhaps?

Now, can someone tell me why the Show method isn't in the interface...
Jamie.

--

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
100% cpu usage bill Excel Discussion (Misc queries) 1 March 2nd 06 10:27 AM
Access from add_in userform to main template userform.... Ajit Excel Programming 1 November 18th 04 05:15 PM
Linking userform to userform in Excel 2003 missmelis01 Excel Programming 2 August 27th 04 08:07 PM
SQL - TOP 1 Usage ell[_2_] Excel Programming 6 August 26th 04 12:08 AM
countif usage ? vbastarter Excel Programming 3 August 19th 04 01:21 AM


All times are GMT +1. The time now is 11:31 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"