Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to have excel file check to see if another excel files is a
directory. If it is i want it to call it and run that file. But if that file is not i want it to continue on. Any help on how to do this would be great. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Path = "driverletterhe\directoryhere\filenamehere"
If Len(Dir(Path)) = 0 Then "Rich Cooper" wrote in message ... I am trying to have excel file check to see if another excel files is a directory. If it is i want it to call it and run that file. But if that file is not i want it to continue on. Any help on how to do this would be great. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Rich,
Try something like Dim FName As String Dim WB As Workbook FName = "C:\Test\Test.xls" '<<<< CHANGE FILE NAME If Dir(FName)<"" Then ' file exists Set WB = Workbook.Open(FName) Else ' file does not exist End If -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Rich Cooper" wrote in message ... I am trying to have excel file check to see if another excel files is a directory. If it is i want it to call it and run that file. But if that file is not i want it to continue on. Any help on how to do this would be great. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Check if a directory exists and if it doesn t... | Excel Programming | |||
How to check if a folder/directory exist using VBA | Excel Programming | |||
How to check if the directory exists? | Excel Programming | |||
Check if directory empty OR no of files in directory. | Excel Programming | |||
get path - save new file - same sub-directory as existing file | Excel Programming |