wsnyder
Board Regular
- Joined
- Sep 23, 2018
- Messages
- 224
- Office Version
- 365
- Platform
- Windows
Hi all,
Using Excel 365.
My code is returning an error:
I believe I declared the Constant correctly.
I tired to move the path directly to the function call, bypassing the constant declaration and it worked as expected.
Not sure what is goin on here?
Thanks,
-w
Using Excel 365.
My code is returning an error:
Compile error:
Constant expression required
I believe I declared the Constant correctly.
I tired to move the path directly to the function call, bypassing the constant declaration and it worked as expected.
Not sure what is goin on here?
Thanks,
-w
VBA Code:
Sub Test_GetFile()
Const zPath As String = "\\Folder\Subfolder\SubSubFolder\SubSubSubFolder\SubSubSubSubFolder\"
GetFileNames Path:=zPath
'GetFileNames is a Function using FSO
End Sub