Hi everyone.
I have a section of VBA code where I want it to open the folder where the workbook is saved.
Issue:
We don't have networked drives - they're essentially cloud drives on SharePoint, but we can browse them locally like they are networked.
When my code runs, it opens up the folder structure, at the correct location, but in a Browser via SharePoint.
I want it to open in File Explorer instead
My code is as follows:
If it helps, it seems the general file path it uses when browsing locally, as an example, is as follows:
C:\Users\joe.bloggs\Company Name\Company Name - Current Projects
Is there a way to solve this issue?
All support is greatly appreciated.
Thank you.
Regards,
Marhier.
I have a section of VBA code where I want it to open the folder where the workbook is saved.
Issue:
We don't have networked drives - they're essentially cloud drives on SharePoint, but we can browse them locally like they are networked.
When my code runs, it opens up the folder structure, at the correct location, but in a Browser via SharePoint.
I want it to open in File Explorer instead
My code is as follows:
VBA Code:
Sub Example()
Dim filePath As String
Dim folderPath As String
filePath = ThisWorkbook.FullName
folderPath = Application.ActiveWorkbook.Path
Call Shell("explorer.exe """ & folderPath & """", vbNormalFocus)
End Sub
If it helps, it seems the general file path it uses when browsing locally, as an example, is as follows:
C:\Users\joe.bloggs\Company Name\Company Name - Current Projects
Is there a way to solve this issue?
All support is greatly appreciated.
Thank you.
Regards,
Marhier.