Dynamic Form Loads: CallByName 
Author Message
 Dynamic Form Loads: CallByName

I need/want to use a sub to load a form in the current app (but not necessarily
in the Forms collection yet).

I imagine something like this:

Private Sub LoadDynamic(sName as String)

Dim UnknownObject as ???       'I don't know what to put here
         Set UnknownObject=???   '    or here
         CallByName UnknownObject, sName & "_Load, VBMethod

End Sub

I want to use this in an ActiveX Control and the formname is a property so I
won't know the object reference at design time but it should resolve at runtime
or I raise an error to the calling app.

Any Clues?  [Global] and App don't work, and adding sName to Forms ahead of the
CallByName requires and object reference not just the name in a string.

Thanks in anticipation,


Fri, 30 Mar 2001 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. how to load custom usercontrol dynamic on form

2. Dynamic loading forms using reflection

3. VB 6.0 Dynamic Form loading?

4. dynamic form loading

5. VB 6.0 Dynamic Form loading?

6. dynamic form loading

7. dynamic form loading

8. Dynamic Loading forms

9. Dynamic Loading of Forms

10. Looking for dynamic ComboBox-VBX (goes too long in Form.Load)

11. Forms dynamic loading

12. Form Dynamic property , app Dynamic property ?


Powered by phpBB® Forum Software