PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook Form Programming 2 VBScript subroutines don't work together

Reply

2 VBScript subroutines don't work together

 
Thread Tools Rate Thread
Old 26-08-2004, 11:34 AM   #1
Barry
Guest
 
Posts: n/a
Default 2 VBScript subroutines don't work together


I am writing some very basic code in the VB Script window
of an Outlook Message Form. I have a number of combi boxes
and I want the possible values of one combi-box to be
dependent on the value chosen in another. I have written 2
subroutines which when entered in the Script window
individually work perfectly. However, when I have both
subroutines in the script window, only the subroutine that
is written second in the Script window seems to work when
I run the form. Each subroutine applies to different combi-
boxes - i.e. there's no items on the form that are common
to both subroutines.

Each subroutine begins with:
Sub Item_CustomPropertyChange(ByVal
NameofCombiBoxItAppliesTo)
Set objPage = Item.GetInspector.ModifiedFormPages
("Message")

Any help?

  Reply With Quote
Old 26-08-2004, 05:16 PM   #2
Hollis D. Paul
Guest
 
Posts: n/a
Default Re: 2 VBScript subroutines don't work together

In article <074c01c48b58$50dd4d80$a501280a@phx.gbl>, Barry wrote:
> Any help?
>

You want to have only one routine and use the Case construct to
separate the two sections of code.

Hollis D. Paul [MVP - Outlook]
Hollis@outhousebythesound.com
Using Virtual Access 4.52 build 277 (32-bit), Windows 2000 build 2600
http://search.support.microsoft.com...D=TECH&LN=EN-US

Mukilteo, WA USA


  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off