VBA Form how to load in Outlook 2003

  • Thread starter Thread starter Mitch
  • Start date Start date
M

Mitch

I know this is an absolute newbie question, but I've designed a basic form
with radio/checkboxes etc. All I want it to do is load, but I can't seem to
find any way to actually link it to an Outlook button?

I see references to posting forms that are a different format, (Public forms
or some such thing), and I tried exporting the Form (Not actually sure it's
technically called a form), any advice?
 
Is this an Outlook item form (contact, email, task, etc.) or an actual VBA
form?

What steps did you take to create it?

What version of Outlook?
 
Outlook 2003 11.8206.8221 SP3

Created it by going to the VB editor, insert UserForm. So far everything
I've found points to Contacts, inbox, message, calendar forms... but this is
just a form to generate emails based on user input.
 
You can add a button to the toolbar that calls a macro. A macro is a Public
Sub that takes no arguments. That macro would be used to display your form.
Assuming your form is named "MyForm", to display it you'd use code something
like this:

Public Sub DisplayMyForm()
MyForm.Show vbModal
End Sub

The vbModal argument would stop code execution in your macro until the form
is closed, and wouldn't allow the user to work with anything else in Outlook
until the form was closed.

To open the form in a non-modal way where code execution could continue
after the call to open the form in the macro and the user could work on
other things in Outlook use the argument vbModeless.

If you right-click on the toolbar and select Customize then you can select
the Commands tab, select Macros in the list on the left and select your
macro. Then drag it where you want it on your toolbar. While in customize
mode you can right-click the new button to set properties such as the name
for the button.
 
Back
Top