Enabling checkbox when checked

R

RTT

In my form I have a checkbox Checkbox1. this is not checked.
Now a want to program in VB that if the checkbox is checked it becomes
enabled. i tried:

if CheckBox1.checked = 1 then
checkbox1.enabled = 0
enf if

but he says he can't find object CheckBox1 wich is on my form.. anyone
who can help me?
 
R

RTT

thxs for your help Sue. I'm just not there yet.

now i have this:
Sub Item_Open()
Set myinspector = Item.GetInspector
Set myPage1 = myInspector.ModifiedFormPages("Message")
Set check = myPage1.Controls("chkNeedCheck")
If check.value = 1 Then check.visible = 0
End Sub

so when the forms opens it checks if the value of checkbox chkNeedCheck
is checked, if it is it should be invisible. when it is not checked,
you can still check and uncheck it until you open it again or send it
to someone else, he want see it anymore...

but it's still not working, when i open it checked if stays visible...

anyone who has an idea?
 
S

Sue Mosher [MVP-Outlook]

Did you publish the form? Code doesn't run on unpublished forms.

--
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