I have been using a macro successfully for sometime now, but I have just bought a new machine and I am running W10 and 365 E3 and now the macro will not see the path of the file
The files are all stored in the cloud (Office 365, OneDrive for Business) but are also synced with File Explorer
When i look at the path in Explorer it shows
C:\Users\mkd\OneDrive - Grapevine Computing Ltd\Tutoring\Earnings-MKD\Inv2019-2020
When i look at the properties within Excel it shows
https//grapevinecomputing-my.sharepoint.com/personal/mkd_grapevinecomputing_co_uk/Documents/Tutoring/Earnings-MKD/Inv2019-2020
the file path is used several time in the macro so I added it as a call in via ChDir
I have tried
but i cannot get the directory to be found. The first macro is as follows
I always get run code 76.
I have tried googling, hence the different attempts at the file path, but I am at a lost as to how i write the file path. Any assistance greatly appreciated, Many thanks
The files are all stored in the cloud (Office 365, OneDrive for Business) but are also synced with File Explorer
When i look at the path in Explorer it shows
C:\Users\mkd\OneDrive - Grapevine Computing Ltd\Tutoring\Earnings-MKD\Inv2019-2020
When i look at the properties within Excel it shows
https//grapevinecomputing-my.sharepoint.com/personal/mkd_grapevinecomputing_co_uk/Documents/Tutoring/Earnings-MKD/Inv2019-2020
the file path is used several time in the macro so I added it as a call in via ChDir
I have tried
HTML:
'FilePath = "C:\Users\mkd\OneDrive - Grapevine Computing Ltd\Tutoring\Earnings-MKD\Inv2019-2020"
FilePath = "//grapevinecomputing-my.sharepoint.com/personal/mkd_grapevinecomputing_co_uk/Documents/Tutoring/Earnings-MKD/Inv2019-2020"
'FilePath = "https//grapevinecomputing-my.sharepoint.com/personal/mkd_grapevinecomputing_co_uk/Documents/Tutoring/Earnings-MKD/Inv2019-2020"
but i cannot get the directory to be found. The first macro is as follows
HTML:
Sub PDFSave()
ChDir _
FilePath
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=FilePath & "\" & InvNum _
, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=False
End Sub
I have tried googling, hence the different attempts at the file path, but I am at a lost as to how i write the file path. Any assistance greatly appreciated, Many thanks