yrobbie13
New Member
- Joined
- Nov 7, 2021
- Messages
- 1
- Office Version
- 365
- 2021
- 2019
- 2010
- Platform
- Windows
Hi All, I'm hoping for some help please?
Ive been trying to create a button in excel that saves the file for the current workbook with the name as cell value and a path (Sharepoint). below is what i have so far, but doesn't work. HELP PLEASE
Private Sub CommandButton1_Click()
Dim path As String
Dim FileName1 As String
Dim FileName2 As String
path = "https://scotgold.sharepoint.com/SitePages/Home.aspx?RootFolder=/Shared Documents/100 Administration/"
FileName1 = Range("B5")
FileName2 = Range("C5")
ActiveWorkbook.SaveAs FileName:=path & FileName1 & FileName2 & Format(Now(), " DD-MM-YYYY hh_mmAMPM"), FileFormat:=xlOpenXMLWorkbookMacroEnabled
End Sub
Ive been trying to create a button in excel that saves the file for the current workbook with the name as cell value and a path (Sharepoint). below is what i have so far, but doesn't work. HELP PLEASE
Private Sub CommandButton1_Click()
Dim path As String
Dim FileName1 As String
Dim FileName2 As String
path = "https://scotgold.sharepoint.com/SitePages/Home.aspx?RootFolder=/Shared Documents/100 Administration/"
FileName1 = Range("B5")
FileName2 = Range("C5")
ActiveWorkbook.SaveAs FileName:=path & FileName1 & FileName2 & Format(Now(), " DD-MM-YYYY hh_mmAMPM"), FileFormat:=xlOpenXMLWorkbookMacroEnabled
End Sub