There's an easier way -- ShowFormPage /HideFormPage, as in:
Item.GetInspector.HideFormPage "1"
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
"Eric Legault [MVP - Outlook]" wrote in message ...
Assuming you want the selected number to indicate which page you want
disabled, the code would work like this if you created a field called
MyComboBoxField and bound it to a combo box:
Sub Item_CustomPropertyChange(ByVal Name)
If Name = "MyComboBoxField" Then
Select Case Item.UserProperties("MyComboBoxField").Value
Case 1
Item.GetInspector.ModifiedFormPages("1").Enabled = False
Item.GetInspector.ModifiedFormPages("2").Enabled = True
Item.GetInspector.ModifiedFormPages("3").Enabled = True
Case 2
Item.GetInspector.ModifiedFormPages("1").Enabled = True
Item.GetInspector.ModifiedFormPages("2").Enabled = False
Item.GetInspector.ModifiedFormPages("3").Enabled = True
Case 3
Item.GetInspector.ModifiedFormPages("1").Enabled = True
Item.GetInspector.ModifiedFormPages("2").Enabled = True
Item.GetInspector.ModifiedFormPages("3").Enabled = False
End Select
End If
End Sub
--
Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/
"Ceige" wrote:
Thank you Eric i thought i was at a loss with this one
Ok my next question is "yep you guessed it" how to disable the forms using
the combo box
Just remeber a coding virgin here
Hehe
Anyway thanks peeps
"Eric Legault [MVP - Outlook]" wrote:
You can't hide tabs in a custom form except in design mode. The best you can
do is disable them in code, but they'll still be visible but not "clickable".
--
Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/
"Ceige" wrote:
Ok heres the deal
I am trying to create a form in outlook, now that in its self is not to hard
but i am not a programmer and i wanted to get a bit flash, here is what i
want to do
i have four tabs in my form named (for the sake of this post):
Main - 1 - 2 - 3
Now i want a combo box on the "main" tab with 1,2 and 3 as options
Ok thats not a problem. Now here is what i want.
If the combo box is set to 1 for example i want "2" and "3" to either be
invisible or be disabled. so if the person then changed the combo box to "3"
then 1 and 2 would be invissable or disabled.
Im sure it can be done with some sort of code to check what value is in
combo box and if it matches certain criteria to either change the enabled
states of the other pages or to change that value HideSomethingSomething in
vb.
i know there is someone who can help me but please try to keep it simple as
i really dont have a clue about VB (ok i can sort of get the idea but dont
have a clue about terminology)
Any help would be great and make me look so clever at work