UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Dialog box with options, Office 2003    
 
   
dp724
post Oct 11 2010, 12:51 PM
Post #1

UtterAccess Addict
Posts: 139



Can someone direct to a reference or provide instruction on creating a VB Script which will give the user the option of selecting between 3 alternatives. When clicking an option an additional associated script will run.

Any help will be greatly appreciated.

Dave
Go to the top of the page
 
+
dp724
post Dec 17 2012, 01:50 PM
Post #2

UtterAccess Addict
Posts: 139



Solution:

On Error Resume Next

Set wshShell = WScript.CreateObject ("WSCript.shell")

strMenu="Select Program Area" & VbCrLf & "---------------------------------" & VbCrLf & "1 - Electrical" & VbCrLf & "2 - Equipment" & VbCrLf & "3 - Structures"

rc=InputBox(strMenu,"TS",1)
If IsNumeric(rc) Then
Select Case rc
Case 1
wshshell.run "S:\TSELE.VBS"
Case 2
wshshell.run "S:\TSLE.VBS"
Case 3
wshshell.run "S:\TSLS.VBS"
Case Else
wscript.close
End Select
Else
WScript.Echo "Invalid option. Numbers only."
End If
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 23rd May 2013 - 02:41 PM