Something simple not working right

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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
 
Back
Top