Something simple not working right

A

Angyl

I have some minimal programming experience in Word.

I'm in school right now learning VB as well.

Outlook doesn't seem to want to play by the rules, however. I'm trying to
start very basic in Outlook just to make sure I can make a form and command
it properly. I've got a Command Button
and a Label called Label6

In the Form : View Code I am entering this very simple code:

Sub CommandButton1_Click()
Label6.Visible = False
End Sub

Very simple. DEFINITELY works in Word, DEFINITELY works in Visual Studio.

Doesn't work in Outlook. When I click the button, I'm being told "Object
required: Label6"

What change in my thinking needs to take place to make otherwise FUNCTIONING
VB code work in Outlook?
 
S

Sue Mosher [MVP-Outlook]

Definitely not the right syntax for Outlook, which requires you to tell it which page you're on, not which control you want to use. See http://www.outlookcode.com/d/propsyntax.htm#unbound

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top