Mass export to excel - data selection based on keys

32 posts / 0 new
Last post
Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

Hi Baricha,

Here is a function that will return a true or a false if the file exists.


'Function assumes that the file will be in the working folder.  If in sub folder then
'the function must be changed to add the sub-folder or the sub-folder needs to 
'be added to the Filename
Function CheckFileExists(ByVal Filename As String) As Boolean
	Dim fso As Object
	
	Set fso = CreateObject("Scripting.FileSystemObject")
	If fso.FileExists(Client.WorkingDirectory & Filename) Then
		CheckFileExists = True
	Else
		CheckFileExists = False
	End If

End Function

Pages