Solved

Create Control On The Fly

Posted on 2011-02-22
7
679 Views
Last Modified: 2013-11-25
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
0
Comment
Question by:PhilChapmanJr
  • 2
7 Comments
 
LVL 29

Accepted Solution

by:
nffvrxqgrcfqvvc earned 250 total points
ID: 34956440
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
 
LVL 2

Author Comment

by:PhilChapmanJr
ID: 34956610
I had rather not use a control because in some instilations  the control will be be available.
0
 
LVL 2

Author Comment

by:PhilChapmanJr
ID: 34992578
Are they a way to create do the same thing using the Microsoft Office Outlook Viewer Control Reference instead of the control?
0
 
LVL 96

Assisted Solution

by:Bob Learned
Bob Learned earned 250 total points
ID: 35030258
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

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Use email signature images to promote corporate certifications and industry awards.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now