View Single Post
Old Jun 14th, 2005, 1:04 AM   #5
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 6 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
GOTO's are the devil. do this...

On Error Resume Next
Dim x as integer
Dim xstr as string
Dim error as boolean
error = true

While error
    xstr = InputBox("Please enter a positive integer: ", "")
    If int(val(xstr)) <= 0 then
        MsgBox("You are a moron, how hard is this...? Let's try again!")
    else
        error = false
        x = int(val(xstr))
    end if
Wend
__________________

tempest is offline   Reply With Quote