Saving excel sheet online instead of locally

Ian1976

Board Regular
Joined
Feb 4, 2016
Messages
137
Office Version
  1. 365
Platform
  1. Windows
Hi, I have a spreadsheet which I currently use locally and is saved on my Desktop in a folder aptly called "Logs", In the spreadsheet is a macro which saves this sheet and creates the following one, saving it locally in the "Logs" folder. What I would like is instead of it saving locally can I get it to upload to a specific folder on my works cloud? I have the location I want to save it too but not sure how to alter the current code/path?

This is the current macro.
Sub CreateNewLog()

Dim tWB As Workbook: Set tWB = ThisWorkbook
Dim aSht As Worksheet: Set aSht = tWB.ActiveSheet
Dim sPath As String: sPath = "C:\Users\" & Environ("username") & "\Desktop\Logs\"

'saves new workbook using data from cells X9 and X10
tWB.SaveAs Filename:=sPath & sDate & "_" & sName
Sheets("Production").Select
End Sub

This is where I want it to save too.
"\\siemens.net\dfs001\Planning Folder\Daily Work\Shift Logs\"

Thanks
Ian
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Forum statistics

Threads
1,214,998
Messages
6,122,643
Members
449,093
Latest member
Ahmad123098

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top