-
-
Notifications
You must be signed in to change notification settings - Fork 0
FileExists
Rodrigo Celso de Lima Porto edited this page Jan 14, 2026
·
2 revisions
Checks if a file exists at the specified file path.
FileExists( _
FilePath As String _
) As Boolean-
FilePath: The complete path to the file being checked
Returns True if the file exists, False otherwise.
- Uses VBA's
Dirfunction to test file existence - Works with any file type
- Path must be accessible from the current environment
- Case-insensitive file path checking
Dim exists As Boolean
exists = FileExists("C:\Documents\myfile.xlsx")
If exists Then
Debug.Print "File exists"
Else
Debug.Print "File not found"
End If- Original source: www.TheSpreadsheetGuru.com/The-Code-Vault
- Resource: http://www.rondebruin.nl/win/s9/win003.htm
- Binary.Unzip πβοΈ
- DateTime.ToUnixTime πβοΈ
- Decision.EntropyWeights πβοΈ
- Decision.TOPSIS πβοΈ
- List.Correlation πβοΈ
- List.Intercept πβοΈ
- List.Outliers πβοΈ
- List.PopulationStdDev πβοΈ
- List.Primes πβοΈ
- List.Rank πβοΈ
- List.Slope πβοΈ
- List.Variance πβοΈ
- List.WeightedAverage πβοΈ
- Number.FromRoman πβοΈ
- Number.IsInteger πβοΈ
- Number.IsPrime πβοΈ
- Number.ToRoman πβοΈ
- Statistical.NormDist πβοΈ
- Statistical.NormInv πβοΈ
- Table.AddColumnFromList πβοΈ
- Table.CorrelationMatrix πβοΈ
- Table.NormalizeColumnNames πβοΈ
- Table.NormalizeTextColumns πβοΈ
- Table.RemoveBlankColumns πβοΈ
- Table.TransposeCorrectly πβοΈ
- Text.CountChar πβοΈ
- Text.ExtractNumbers πβοΈ
- Text.HtmlToPlainText πβοΈ
- Text.RegexExtract πβοΈ
- Text.RegexReplace πβοΈ
- Text.RegexSplit πβοΈ
- Text.RegexTest πβοΈ
- Text.RemoveAccents πβοΈ
- Text.RemoveDoubleSpaces πβοΈ
- Text.RemoveLetters πβοΈ
- Text.RemoveNumerals πβοΈ
- Text.RemovePunctuations πβοΈ
- Text.RemoveStopwords πβοΈ
- Text.RemoveWeirdChars πβοΈ
- AreArraysEquals πβοΈ
- AutoFillFormulas πβοΈ
- CleanString πβοΈ
- DisableRefreshAll πβοΈ
- EnableRefreshAll πβοΈ
- FileExists πβοΈ
- FileNameIsValid πβοΈ
- GetAllFileNames πβοΈ
- GetLetters πβοΈ
- GetMonthNumberFromName πβοΈ
- GetStringBetween πβοΈ
- GetStringWithSubstringInArray πβοΈ
- GetTableColumnNames πβοΈ
- IsAllTrue πβοΈ
- IsInArray πβοΈ
- ListObjectExists πβοΈ
- PreviousMonthNumber πβοΈ
- RangeHasAnyFormula πβοΈ
- RangeHasConstantValues πβοΈ
- RangeIsHidden πβοΈ
- RangeToHtml πβοΈ
- SendEmail πβοΈ
- SetQueryFormula πβοΈ
- StringContains πβοΈ
- StringEndsWith πβοΈ
- StringStartsWith πβοΈ
- SubstringIsInArray πβοΈ
- Summation πβοΈ
- TableHasQuery πβοΈ
- WorksheetHasListObject πβοΈ