Sub ExportSheet()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Dim Folder As String
Dim locationname As String
Dim Response, pw
Dim NewLogRow As Long
Dim formula As String
Dim NameValue As String
Dim FinalName As String
Dim XXX As String
XXX = Format(Date, "[$-409]yyyymmdd;@")
locationname = Sheets("Budget").Range("A3").Value
Folder = "C:\Users\tphythian\Documents\Cost Tracking Exports"
Worksheets("Budget").Visible = True
[COLOR=red] Sheets(Array("Summary", "Budget")).Copy
[/COLOR] With ActiveSheet.UsedRange
.Value = .Value
End With
With ActiveWorkbook
.SaveAs Folder & "\" & locationname & " - " & XXX & " - Export" & ".xlsx"
.Close
End With
MsgBox "Sheet has been exported and saved in " & "Cost Tracking Exports" & " folder!"
Application.ScreenUpdating = True
Application.DisplayAlerts = True
End Sub
[\code]
Neither of the codes provided works. I am wanting to change the line in red to also include a sheet named "Transaction Log". when this code adds all three sheets to the new workbook i want to also have the sheet "transaction log" hidden. hope someone can help.