Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Worksheets(4).Range("A6").Value contains a file path.
What is the code to look for a file in that location "Worksheets(4).Range("A6").Value" and if the file is NOT FOUND, then msgbox "File Not Found" else continue with code? Todd Huttenstine |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub testit()
Dim strTemp As String strTemp = Worksheets(1).Range("A6").Value If strTemp < "" Then If Dir(strTemp) = "" Then MsgBox "File Not Found" Exit Sub End If End If End Sub "Todd Huttenstine" wrote in message ... Worksheets(4).Range("A6").Value contains a file path. What is the code to look for a file in that location "Worksheets(4).Range("A6").Value" and if the file is NOT FOUND, then msgbox "File Not Found" else continue with code? Todd Huttenstine |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you
Todd -----Original Message----- Sub testit() Dim strTemp As String strTemp = Worksheets(1).Range("A6").Value If strTemp < "" Then If Dir(strTemp) = "" Then MsgBox "File Not Found" Exit Sub End If End If End Sub "Todd Huttenstine" wrote in message ... Worksheets(4).Range("A6").Value contains a file path. What is the code to look for a file in that location "Worksheets(4).Range("A6").Value" and if the file is NOT FOUND, then msgbox "File Not Found" else continue with code? Todd Huttenstine . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
File not found | Excel Discussion (Misc queries) | |||
File Not Found menu pops up after I open a file | Excel Discussion (Misc queries) | |||
File not found | Excel Discussion (Misc queries) | |||
How do I reference external data from a file, file name found in . | Excel Discussion (Misc queries) | |||
'File not found' | Excel Programming |