ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Check if Workbook Exists (https://www.excelbanter.com/excel-programming/408259-check-if-workbook-exists.html)

dimm

Check if Workbook Exists
 
Hi agin! :)

The user of my workbook has to save the old version as 'Myworkbook2 in the
specified folder before running my upgrade, and I need to check that they
have befre running the procedure.

Does anyone know how to check if the following workbook esists?

C:\Program Files\My Program\Data\Myworkbook.xls

Thanks for any ideas.....

Gary''s Student

Check if Workbook Exists
 
Sub sssssstitw()
If Dir("C:\Program Files\My Program\Data\Myworkbook.xls") = "" Then
MsgBox ("not there")
Else
MsgBox ("is there")
End If
End Sub

--
Gary''s Student - gsnu200775


"dimm" wrote:

Hi agin! :)

The user of my workbook has to save the old version as 'Myworkbook2 in the
specified folder before running my upgrade, and I need to check that they
have befre running the procedure.

Does anyone know how to check if the following workbook esists?

C:\Program Files\My Program\Data\Myworkbook.xls

Thanks for any ideas.....



All times are GMT +1. The time now is 11:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com