Create Control On The Fly

I'm trying to place the Outlook Address Book on a form.
When I run the code below I don't get any errors I just don't see anything

There is no
oContacts.Top, oContacts.Left,oContacts.Height,oContacts.width or Visible properties

Any help would be appreciated.


Reference
Microsoft Office Outlook Viewer Control

Private Sub Command1_Click()

Dim oContacts As OLXLib.ViewCtl
Set oContacts = New OLXLib.ViewCtl

oContacts.AddressBook


End Sub
LVL 2
Phil ChapmanAsked:
Who is Participating?
 
nffvrxqgrcfqvvcCommented:
Instead of "Reference" try looking for it under Add "Component" instead. Then it *might add a control to your VB control box that you could add to the form.
0
 
Phil ChapmanAuthor Commented:
I had rather not use a control because in some instilations  the control will be be available.
0
 
Phil ChapmanAuthor Commented:
Are they a way to create do the same thing using the Microsoft Office Outlook Viewer Control Reference instead of the control?
0
 
Bob LearnedCommented:
If you don't add the control through the designer, then you need to add controls to the form:

Me.Controls.Add(control)

Open in new window


How To Dynamically Add Controls to a Form with Visual Basic 6.0
http://support.microsoft.com/kb/190670
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.