Hi RIT150,
If you are trying to get the location of the Excel workbook that is stored in SharePoint online library, open that workbook in desktop application and then click File>Info>Copy path.
Clicking “Copy path” will give you a path in this format: https://Tenant.sharepoint.com/sites/SiteName/Shared%20Documents/FileName.xlsx?web=1
With this starting point, all you need to do is remove the ?web=1 query string parameter at the end of the URL, and you have the path to the workbook that you need to write a macro.
You will get this kind of URL after removing ?web=1 that you can use in macro.
https://Tenant.sharepoint.com/sites/SiteName/Shared%20Documents/FileName.xlsx
Please check if this works for you. If you need any help let me know. Have a nice day and stay safe😊
Regards,
Neha