HELP! What am I doing wrong!?!!

J

Jackson Smith

I am trying write a script that hides/unhides a page in an
email form when a checkbox is unchecked/checked. (Outlook
2000) I have little experience with programming VB script
so I am having trouble figuring out my problem. When I
run the script below I get the following error: "You
don't have appropriate permission to perform this
operation" I am not sure if I have a line of code wrong
or my form set up wrong. It works in a demo that I
downloaded but I can't get it to work in my form. Any
help would be GREATLY appreciated. I am new at this so
please try to dumb it down for me!


Sub Item_CustomPropertyChange(ByVal CheckBox15)
Dim objInsp

Set MyPage = Item.GetInspector.ModifiedFormPages("Memo
Request:")

If MyPage.Controls("CheckBox15").value = false then
Set objInsp = Item.GetInspector
objInsp.HideFormPage "Bill of Materials:"
Set objInsp = Nothing
Else
Set objInsp = Item.GetInspector
objInsp.ShowFormPage "Bill of Materials:"
Set objInsp = Nothing
End If

Any help would be greatly appreciated.
Thanks,
Jack
 

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