Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Forms / August 2004

Tip: Looking for answers? Try searching our database.

2 VBScript subroutines don't work together

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Barry - 26 Aug 2004 11:34 GMT
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?
Hollis D. Paul - 26 Aug 2004 17:16 GMT
> 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/kb/c.asp?FR=0&SD=TECH&LN=EN-US
     
Mukilteo, WA  USA
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.