Set oShell = CreateObject("Wscript.Shell")
Set WSHShell = WScript.CreateObject("WScript.Shell")
Message = "Set time till beep in miliseconds - 60000 miliseconds = 1
minute"

result = InputBox(Message, "Beep", 100, 100)

Script.wait = result

Sub Beep (n, wait)
For i = 1 To n
oShell.Run "%comspec% /c echo " & Chr(7), 0, False
Next
End Sub

..

Thats how far I got, don't really know where to go from here.

How do I get the script to wait for the amount of set by the Input
box.

Help is greatly appreciated!

Re: Input box set variable problem. by Pegasus

Pegasus
Sat Mar 22 17:53:30 CDT 2008


"Lashnjo" <pardue.stephen@gmail.com> wrote in message
news:94ec07c9-d582-42fb-9232-6c8b71843e1a@a1g2000hsb.googlegroups.com...
> Set oShell = CreateObject("Wscript.Shell")
> Set WSHShell = WScript.CreateObject("WScript.Shell")
> Message = "Set time till beep in miliseconds - 60000 miliseconds = 1
> minute"
>
> result = InputBox(Message, "Beep", 100, 100)
>
> Script.wait = result
>
> Sub Beep (n, wait)
> For i = 1 To n
> oShell.Run "%comspec% /c echo " & Chr(7), 0, False
> Next
> End Sub
>
> ..
>
> Thats how far I got, don't really know where to go from here.
>
> How do I get the script to wait for the amount of set by the Input
> box.
>
> Help is greatly appreciated!
>

Try this function:

wscript.sleep(result)

Downloading script56.chm would give you a list of the most
common functions and how to use them.