![]() |
Path and File
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 |
Path and File
Use DIR:
If Dir(filespec) = "" Then do something else End If -- Gary''s Student - gsnu200833 "Heera" wrote: 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 |
Path and File
On Feb 13, 10:00*pm, Heera wrote:
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 |
Path and File
Both the solutions were usefull.
Thank you........ |
Path and File
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 |
All times are GMT +1. The time now is 01:36 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com