Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

getting extra! macro to save .xls as date+filename

Status
Not open for further replies.

brumo

Technical User
May 30, 2008
15
0
0
US
Here's what I had, and it just quit working.
Code:
Sub Main()

  Dim xl as Object,wb as Object 
  Set xl = CreateObject("Excel.Application")
  set wb = xl.Workbooks.Open("c:\_excel ccmbalance.xls")
  xl.visible = true
                        
 wb.SaveAs filename:=Format(Date, "mm.dd.yy") & wb.FullName & ".xls"
 
End Sub
 
not using wb.FullName fixed my issue.
Code:
wb.SaveAs filename:= "c:\" & Format(Date, "mm.dd.yy") & "_excel ccmbalance.xls"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top