Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Outlook 2000 Form & VB/VBScript

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,229
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Outlook 2000 Form & VB/VBScript
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Outlook 2000 Form & VB/VBScript - 6/30/2001 11:09:18 AM   
  rhl150

 

Posts: 29
Score: 0
Joined: 5/23/2001
From: New Zealand
Status: offline
I have a form that needs a little VBScript tweeking, I think.

I have an Option button with a properties label of "OtherOption". Next
to it on the form I have created a text box with the properties label of
"OtherInfo".

There are several other Option buttons on the form.

What I want to be able to do is to have the "OtherInfo" text box be
enabled only when the "OtherOption" option button has been clicked,
otherwise the text box should be disabled if any other Option button is
selected.

If someone can guide me to a reference place where I can learn how
to do this trick, or can help out, I'd be greatly appreciative.

I have set the default of the OtherInfo (the text box)to disable and I
tried using coding like this:

Private Sub OptionOther_onClick()
OtherInfo.Enabled = -1 ****where -1 = True
End Sub

when running the form, the text box does not enable when I click on
the OptionOther radio (option) button.

Thanks.
 
 
Post #: 1
 
 Re: Outlook 2000 Form & VB/VBScript - 6/30/2001 11:10:27 AM   
  century

 

Posts: 10
Score: 0
Joined: 6/7/2001
From: USA
Status: offline
If you're not opposed to using a little javascript, instead of vbscript,
here's something that does more or less the same thing --

The names and what is clicked is different, but the idea is the same:

<html>
<head>
<title>test</title>
<script language=javascript>

function checkIt(){
if (document.thisForm.c1.checked == true ||
document.thisForm.c2.checked == true)
document.thisForm.c3.disabled = false;
else
document.thisForm.c3.disabled = true;
}

</script>
</head>
<body onLoad="document.thisForm.c3.disabled = true;">
<form name=thisForm action="somepage.asp" method=post>
<input type=checkbox name=c1 onClick="checkIt();">
<input type=checkbox name=c2 onClick="checkIt();">
<input type=textbox name=c3>
<input type=submit name=submit value=submit>
<input type=reset name=reset value=reset
onClick="document.thisForm.c3.disabled = true;">
</form>
</body>
</html>

Where the text box is disabled as soon as the page loads, and does
not become enabled until one of the checkboxes has been turned on --

hitting 'reset' will disable the box again --

If this isn't clear, post back, with your code, and we'll work it out.


good luck!

(in reply to rhl150)
 
 
Post #: 2
 
 Re: Outlook 2000 Form & VB/VBScript - 6/30/2001 11:12:30 AM   
  rhl150

 

Posts: 29
Score: 0
Joined: 5/23/2001
From: New Zealand
Status: offline
The reading that I have done with regards to writing a script for
Microsoft Outlook only mentions being able to use Visual Basic, VB
Script, Visual Interdev and some other seemingly MS based software.

If you know that javascript is a supported scripting language within
Outlook, then I could try the script that you wrote.

Thanks for the reply as I'm sure that I can still put it to good use if not
on this mission.

(in reply to rhl150)
 
 
Post #: 3
 
 Re: Outlook 2000 Form & VB/VBScript - 6/30/2001 11:13:41 AM   
  bigtop

 

Posts: 15
Score: 0
Joined: 5/31/2001
From: USA
Status: offline
Just a little modification got it working in vbscript:

<html>
<head>
<title>test</title>
<script language=vbscript>

function checkIt()
if ((document.thisForm.c1.checked = true) or
(document.thisForm.c2.checked = true)) then
document.thisForm.c3.disabled = false
else
document.thisForm.c3.disabled = true
end if
end function

function resetIt()
document.thisForm.c3.disabled = true
end function

</script>
</head>
<body onLoad="resetIt()">
<form name=thisForm action="somepage.asp"
method=post>
<input type=checkbox name=c1
onClick="checkIt()">
<input type=checkbox name=c2
onClick="checkIt()">
<input type=textbox name=c3>
<input type=submit name=submit value=submit>
<input type=reset name=reset value=reset
onClick="resetIt()">
</form>
</body>
</html>

(in reply to rhl150)
 
 
Post #: 4
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Outlook 2000 Form & VB/VBScript Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts