Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

script for Outlook Form???

Status
Not open for further replies.

daveninja

Technical User
Jul 11, 2001
4
US
I want to do something like:

On Click (or On Property Change to TRUE) for CheckBox3
then make Text3 and TextBox3 VISIBLE and ENABLED.

I know this is nowhere near where I need to be, but I can't find anything on the net!!!

THANX!!!
 
an event sub it's like this &quot;sub ControlName_On<EventName>&quot;
if ControlName=CheckBox3 and
EventName=Click
then the function it's like

sub CheckBox3_OnClick
Text3.Visible=True
TextBox3.Enabled=True
end sub

Hope this help u...
 
Thank you Shadow! I tried the script and from what I can figure this would work in VB:

sub CheckBox3_OnClick
Text3.Enabled=True
TextBox3.Visible=True
end sub

However, it doesn't work in VBScript for Outlook (?). Obviously I don't know much about this, but from what I've been trying to piece together there is no OnClick in Outlook???

Those are the names of the objects, though...

Thanks for trying!
 
I dont know that u use Outlook VBscript
U are using an Outlook editor for script like VBscript for Excel or Word, or something?
Tell me more abou it... i could help u because i had the same problem in &quot;Excel VBscript&quot;
 
Yeah, there's an Outlook script editor.

Found the substitute for OnClick. Its Click.

sub CheckBox3_Click
Text3.Enabled = True
TextBox3.Visible = True
end sub

Now this finally recognizes that I clicked the checkbox. But the debugger comes up and says it can't find Item &quot;Text3&quot;. That IS the name of the object, though. The help file lists an example with

DIM Text 3

at the beginning (to declare the items?), but that doesn't work either.

???
 
I'VE Found it!!!!!

After extensive use of the Help files : ) I've finally found something that works like it should:

Dim Text3
Dim TextBox3
Dim CheckBox3

Sub CheckBox3_Click()
Text3.Enabled = CheckBox3.Value
TextBox3.Visible = CheckBox3.Value
End Sub

Sub Item_Open()
Set Text3 = Item.GetInspector.ModifiedFormPages.Item(&quot;Message&quot;).Controls(&quot;Text3&quot;)
Set TextBox3 = Item.GetInspector.ModifiedFormPages.Item(&quot;Message&quot;).Controls(&quot;TextBox3&quot;)
Set CheckBox3 = Item.GetInspector.ModifiedFormPages.Item(&quot;Message&quot;).Controls(&quot;CheckBox3&quot;)
End Sub

Thanks for all your help, Shadow!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top