Dear Team,
I have the following codes as mentioned below which works fine when Running in Macro Enabled Work book but my Objective is to run these subroutine as mentioned below with Personal.xlsb and Saving it as Macro free workbook . The code are as follows
The code creates folder and Subfolder in the Directory
1st
2nd
I would appreciate if these code are saved in my personal.xlsb and can use it for future reference without saving any Independent Macroenabled workbook
Thanks
I have the following codes as mentioned below which works fine when Running in Macro Enabled Work book but my Objective is to run these subroutine as mentioned below with Personal.xlsb and Saving it as Macro free workbook . The code are as follows
The code creates folder and Subfolder in the Directory
1st
VBA Code:
Function Folder_Existence(Mypath As String) As Boolean
Application.Volatile
If VBA.Dir(Mypath, vbDirectory) = "" Then
Folder_Existence = False
Else
Folder_Existence = True
End If
End Function
2nd
VBA Code:
Sub CreateMultipleFolder()
Dim sh As Worksheet
Set sh = ThisWorkbook.ActiveSheet
Dim sub_folder_path As String
Dim i As Integer
For i = 4 To sh.Range("I" & Application.Rows.Count).End(xlUp).Row
sub_folder_path = sh.Range("C1").Value & Application.PathSeparator & sh.Range("I" & i).Value
If Dir(sub_folder_path, vbDirectory) = "" Then
MkDir (sub_folder_path)
sh.Range("K" & i).Value = "Created"
Else
sh.Range("K" & i).Value = "Available"
End If
Next i
End Sub
I would appreciate if these code are saved in my personal.xlsb and can use it for future reference without saving any Independent Macroenabled workbook
Thanks