Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have read through some of the posts but cannot find an answer to the
question of - - How do you test for the existance of a file in a directory. I can create and navigate to directories based upon month of the year as per my example code: sPath = "E:\LE\LE " & XlMonth2 & " 05\" & "29382_" & XlMonth2 & "_CIS_Ph1&2 Roll Up .xls" xlApp.Workbooks.Open sPath ' & Format(Date, "yyyymmdd.xls") xlApp.Workbooks.Open (sPath), 0, ReadOnly = True xlApp.ActiveWorkbook.Windows(1).Visible = False But how do I test if the file is there before trying to open it in case the file has not yet been deposited by the accounting departmnet yet? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Testing | Excel Discussion (Misc queries) | |||
TESTING | Excel Worksheet Functions | |||
Testing | Excel Discussion (Misc queries) | |||
Creating a macro that lists directory names within a directory.... | Excel Programming | |||
Check if directory empty OR no of files in directory. | Excel Programming |