Create a folder in One drive using Excel VBA
Chandrakanth Gajawada
1
Reputation point
I am trying to create a folder in One Drive using Excel VBA but I am getting a run time error. Please help
Sub Script()
Folderpath = (Application.ActiveWorkbook.Path) & "/"
usrdt = Format(Date, "DDMMMYYYY") & "-" & Format(Now(), "HHmmss")
VBA.FileSystem.MkDir (Folderpath & usrdt)
End Sub
Microsoft 365 and Office Development Other
4,374 questions
Developer technologies Visual Basic for Applications
1,507 questions
Sign in to answer