Commits

Christian Specht committed 59deae8

use File_Exists everywhere

Comments (0)

Files changed (2)

vba-helpers-dev.bas

 
     'import tests
     exportfile_vbah = Path_Combine(Path_GetCurrentDirectory, vbahelperstestfilename_vbah)
-    If Dir(exportfile_vbah) = "" Then
+    If Not File_Exists(exportfile_vbah) Then
         message_vbah = String_Format("Couldn't find test class:{0}{1}", vbCrLf, exportfile_vbah)
         MsgBox message_vbah, vbCritical
         Exit Sub
 
     'import dev functions
     exportfile_vbah = Path_Combine(Path_GetCurrentDirectory, vbahelpersdevfilename_vbah)
-    If Dir(exportfile_vbah) = "" Then
+    If Not File_Exists(exportfile_vbah) Then
         message_vbah = String_Format("Couldn't find dev functions:{0}{1}", vbCrLf, exportfile_vbah)
         MsgBox message_vbah, vbCritical
         Exit Sub
 '# VBA Helpers
 '# A collection of useful VBA functions
 '#
-'# Version 20121228.001859
+'# Version 20121228.002139
 '# (the version number is just the current date/time)
 '#
 '# Copyright (c) 2012 Christian Specht
 Public Sub File_Delete(ByVal path_vbah As String)
     'Deletes a file. If the file does not exist, nothing happens.
 
-    If Dir(path_vbah) > "" Then
+    If File_Exists(path_vbah) Then
         Kill path_vbah
     End If
 
 
     exportfile_vbah = Path_Combine(Path_GetCurrentDirectory, vbahelpersfilename_vbah)
 
-    If Dir(exportfile_vbah) = "" Then
+    If Not File_Exists(exportfile_vbah) Then
         message_vbah = String_Format("Couldn't find VBA Helpers file in current directory:{0}{1}{0}{0}VBA Helpers update failed!", vbCrLf, exportfile_vbah)
         MsgBox message_vbah, vbCritical
         Exit Function