Hi All!
I'm using the following bit of code to "export" a sheet to a sharepoint location - works fine. I would like it to "export" two sheets from my workbook (there's multiple sheets but I only want to export two of them).
The second sheet is Worksheets(6)
Any ideas on how to do this?
Thanks all!
I'm using the following bit of code to "export" a sheet to a sharepoint location - works fine. I would like it to "export" two sheets from my workbook (there's multiple sheets but I only want to export two of them).
VBA Code:
Sub Export()
Dim ws1 As Worksheet
Dim dest As String, rotaDate As String
Set ws1 = Worksheets(1)
dest = "InterwebURL"
rotaDate = ws1.Range("B4").Value
ws1.Copy
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs dest & Format(rotaDate, "DD-MM-YYYY") & ".xlsx"
Application.DisplayAlerts = True
ActiveWorkbook.Close
End Sub
The second sheet is Worksheets(6)
Any ideas on how to do this?
Thanks all!