G
Gojavid
I have some code that maps a network drive using a shell and command
prompt. In the same code it checks if the command was successful or
not. The problem is that it takes a second for command prompt to
create the drive and the macro is already passed the check by the time
it actually maps the drive.
The check I use is:
If dir("mapped drive name")="" then
msgbox("Drive mapping was not successful.")
end if
I was hoping that I could have the macro wait a few seconds before it
checks to see if the drive is mapped. I thought about a loop, but I
didn't want it to continue forever if the drive didn't map.
Any ideas?
prompt. In the same code it checks if the command was successful or
not. The problem is that it takes a second for command prompt to
create the drive and the macro is already passed the check by the time
it actually maps the drive.
The check I use is:
If dir("mapped drive name")="" then
msgbox("Drive mapping was not successful.")
end if
I was hoping that I could have the macro wait a few seconds before it
checks to see if the drive is mapped. I thought about a loop, but I
didn't want it to continue forever if the drive didn't map.
Any ideas?