Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Set object1 = ????
What do I need to put in the ???? to get this code to work?
Dim object1 as object Set object1 = ???? object1.fileexists() Thanks! Bob |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Set object1 = ????
I think that you're looking at the FileSystemObject
set a reference to Microsoft Scripting Runtime ... to set a reference to a dll, in the IDE click references under the Tools menu Example Code: Sub TestFileExists() Dim strFile As String strFile = Application.GetOpenFilename() MsgBox FileExists(strFile) End Sub Function FileExists(strFilename As String) As Boolean Dim fso As Scripting.FileSystemObject Set fso = New Scripting.FileSystemObject FileExists = fso.FileExists(strFilename) Set fso = Nothing End Function HTH Patrick Molloy Microsoft Excel MVP "BobAchgill" wrote: What do I need to put in the ???? to get this code to work? Dim object1 as object Set object1 = ???? object1.fileexists() Thanks! Bob |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|