Afternoon all,
Im trying to create a code that will automatically check for the correct monthly folder and if it doesnt exist it would create it.
As it will change every month I would like to use a variable method but I keep getting an error.
is there any way to solve this?
Thanks in advance.
Stuart
Im trying to create a code that will automatically check for the correct monthly folder and if it doesnt exist it would create it.
As it will change every month I would like to use a variable method but I keep getting an error.
Code:
Sub FindFolder()
Dim fso As Object
Const FLDR_NAME As String = "\\Intranet.barcapint.com\dfs-emea\BWGroup\BWData\Kyc\FATCA\BAU\"
Set fso = CreateObject("Scripting.FileSystemObject")
If Not fso.FolderExists(FLDR_NAME) Then
fso.CreateFolder (FLDR_NAME)
End If
End Sub
is there any way to solve this?
Thanks in advance.
Stuart