Forum Discussion
Deleted
Jun 04, 2018Create a folder on share point through Excel VBA
Hi Guys, have you ever try create folder on share point through Excel VBA? My code worked in last month, however it is failed to work recent days, and the error type is run time error '76', path not...
Deleted
Jun 04, 2018Can you Please try below
Dim strDate As String Dim strTime As String strDate = Date strTime = Time strDate = Format(Now(), "mmmdd yyyy hh mm") Dim strURL As String ''Copy and paste the URL of your sharePoint folder where you want to create another folder strURL = "http://Your URL" strURL = Replace(Replace(strURL, "http:", ""), "/", "\") ' MsgBox strDate, vbInformation Dim Fld_r As String Fld_r = strURL & strDate MsgBox Fld_r, vbInformation If Dir(Fld_r, vbDirectory) Then MkDir (Fld_r) DoEvents End If
- DeletedJun 05, 2018
Hi thanks for your reply. i tried this way, and run time error 52 bad file name occurred, at this sentence : If Dir(Fld_r, vbDirectory) Then
I googled and still didn't find the reason.
Do you have any ideas?
Thanks.