I had previously set up VBA to automatically create a folder in Explorer if it didn't exist, and open the folder having set a hyperlink to a file path set in Sheets("Costs, etc").Range("D5")
Now however the company I work for has moved to exclusively using Sharepoint rather than having any documents saved locally - I'm not sure how to go about changing this code so that rather than creating the folder in Explorer it does so on Sharepoint?
If .Value = "Mobile Plant" And Cells(i, 6) <> "" And Cells(i, 14) <> "" Then
ActiveSheet.Hyperlinks.Add Anchor:=Cells(i, 4), Address:=Sheets("Costs, etc").Range("D5") & Cells(i, 4) & " ("& Cells(i, 12) & ")", TextToDisplay:=.Value
ActiveSheet.Hyperlinks.Add Anchor:=Cells(i, 17), Address:=Sheets("Costs, etc").Range("D5") & Cells(i, 4) & " ("& Cells(i, 12) & ")\"& Cells(i, 4) & " ("& Cells(i, 12) & ").docx", TextToDisplay:="Y"
dirName = Cells(4, i).Values
MkDir (Sheets("Costs, etc").Range("D5") & Cells(i, 4) & " ("& Cells(i, 12) & ")")
Call Shell("explorer.exe"& ""& """"& Sheets("Costs, etc").Range("D5") & Cells(i, 4) & " ("& Cells(i, 12) & ")""", vbNormalFocus)