View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Template - Save As File Name

Instead of using the builtin menus (File|Save, File|SaveAs), have the associate
run your Save_It macro.



Jani wrote:

In looking at all these helpful hints, I am doing something wrong with what
should be simple code. I have an Excel template and want the file to be saved
to a reference cell. When I click on Save, Close, Save as.. it defaults to
the name of the template. The associate can save the file wherever she/he
wants to. Need some assistance - thanks! Jani
Sub save_it()
Dim fname
With ActiveWorkbook
fname = .Worksheets("worksheet1").Range("b9").Value & ".xls"
.SaveAs fname
End With
End Sub


--

Dave Peterson