-
Well, using a menu, I coded a ru nprogram into it with hopes that
'everything would be alright'
but it wasn't....
is there a check or 'ifexists blahblah' command that I could use to check this code:
progr = inputbox("What would you like to run?")
shell = progr, vbnormalfocus
now, is there a SIMPLE way to check so that if the command does not excist, it will not run it or give you an error message or start explorer in that directory? Please help me, oh and we need a chat room, Hey how do you get to 'fanatic' or 'guru' status?
-
Use the Dir() function.
Code:
Resp = InputBox("Enter a File to open")
'Check if file exsists
Retval = Dir(Resp)
If Retval <> "" Then
'It does exsist so run it
Shell Resp, vbNormalFocus
Else
'It does not exsist
MsgBox ("It does not exsist")
End If
-
Fanatic Member status comes from posting a lot. Guru status is voted on you, if you have made many posts of a consistently high standard. Megatron here is a good example :D