Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
100% cpu usage | Excel Discussion (Misc queries) | |||
Access from add_in userform to main template userform.... | Excel Programming | |||
Linking userform to userform in Excel 2003 | Excel Programming | |||
SQL - TOP 1 Usage | Excel Programming | |||
countif usage ? | Excel Programming |