View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Bobby Bobby is offline
external usenet poster
 
Posts: 75
Default Saving with name and date macro

Thank You for the replies Guys, your help, once again has got me what i
needed.

"Dave Peterson" wrote:

Option Explicit
Sub Testme()
Dim myFileName As String
Dim myPath As String
myPath = "C:\somefoldernamehere\"
With ActiveWorkbook.Worksheets("sheet1")
myFileName = .Range("b5").Value _
& "-" _
& Format(.Range("B6").Value, "yyyy-mm-dd") & ".xls"
.Parent.SaveCopyAs Filename:=myFileName
End With
End Sub

This doesn't have any validity checks at all!


Bobby wrote:

Hi i hope someone can help me.
I'm trying to set up a macro to save a work book with the name taken from
cell B5 and the date in B6, but after saving i then i need it to stay on the
original book and not on the newly saved one.
Can anyone help please?


--

Dave Peterson