[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 159
  • Last Modified:

Create an object at runtime

Hallo!!

It is possible create a MonthView object at runtime???


I need this object in all forms, but i don't want insert it in all...

Can i define a public object ?

Please, help...
Any solution!!!

Thanks
0
kaiou
Asked:
kaiou
1 Solution
 
yronnenCommented:
This is one of the major problems of VB6. You cannot add objects at runtime, unless you have at least one instance of the object on the form you want to the control too.

Sorry.
0
 
rettiseertCommented:
The basic idea is:

Dim mv As MSComCtl2.MonthView
Set mv = Me.Controls.Add("MSComCtl2.MonthView", "ControlName")
mv.Visible = True

Try reading some tutorials on control creation at runtime

http://www.vbexplorer.com/VBExplorer/vb_feature/april2000/april2000.asp
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now