Sub SaveTwice()
Dim ProjectNumber As String
Dim ProjectName As String
Dim SaveLocation As String
Dim XXX As String
ProjectNumber = Sheets("Budget").Range("A3").Value
ProjectName = Sheets("Budget").Range("A4").Value
SaveLocation = "C:\Users\tphythian\Documents\WWCI Cost Tracking Module\Archive"
XXX = Format(Date, "[$-409]ddmmmyyyy;@")
With ActiveWorkbook
.Save
.SaveAs SaveLocation & ProjectNumber & " - " & ProjectName & " - " & XXX & ".xlsx"
End With
End Sub
[\code]
I believe there is a problem with the .saveas line but i can't figure it out. i am getting an error message that says:
"this extension can not be used with the selected file type. change the file extension in the file name text box or select a diffrent file type by changing the Save as type."
I am also trying to have the code above run whenever the "save" button is clicked on the top ribbin bar in Excel 2010. To try and get it to execute when that button is clicked i am using the following code:
[code]
Private Sub workbook_save()
Application.******* "save", "savetwice"
End Sub
[\code]
anyone have suggestions on getting this up and running?