Path and File

H

Heera

Hi,

1 Problem : I have a share drive in my company but some times it is
accessable and some times it is not accessable due to some technical reason.

If the share drive is not accessable I get an error can anyone tell me how
to handel this error exit the macro.

2 Problem : How can I come to know if a particular file is available on a
particular path.

3. Problem : How can I come to know if a particular path is available on a
computer.

Regards
Heera
Regards
Heera
 
M

marwan.hefnawy

Hi,

1 Problem : I have a share drive in my company but some times it is
accessable and some times it is not accessable due to some technical reason.

If the share drive is not accessable I get an error can anyone tell me how
to handel this error exit the macro.

2 Problem : How can I come to know if a particular file is available on a
particular path.

3. Problem :  How can I come to know if a particular path is available on a
computer.

Regards
Heera
Regards
Heera

You can use the DIR function.

MyPath="\\server\xyz\abc.xls"
StrReturn=dir(MyPath)
if StrReturn="" then
msgbox "The path is not availableor the file is not there"
end if
 
H

Heera

Gary can you answer my first problem.

when I dissconnect the cable of network and try to run the macor I get an
error.

It say bad file name error 52. How do i handle this error.
Regards
Heera
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top