|
-
Aug 3rd, 2000, 01:53 PM
#1
Thread Starter
Member
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?
Wisdom is supreme, therefore get wisdom,
though it costs all you have, get understanding.
Proverbs 4:7
-
Aug 3rd, 2000, 01:58 PM
#2
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
-
Aug 3rd, 2000, 02:03 PM
#3
Monday Morning Lunatic
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
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|