Thread: auto archiving
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
torpido torpido is offline
external usenet poster
 
Posts: 1
Default auto archiving


Hi, i tried this on general froum, so far i got one reply which was a
macro, it kinda didnt work. can somebody help me, ill be very glad
thanks
hi all
just wanted to aks if there is any kinda of auto- fucntion that can
archive a worksheet separatly wihout needing to save the acctual file.
like i have "book1" and i add an entry then print the sheet but i dont
want to save it cuz its a template-like but i want to have a record of
it some where else with same date.
like "book1 05-10-2005", "book1 06-10-2005" and so on to be saved in
given path(folder).

i know i can do this by "save-as" but then i must always give the file
name over and over and i must choose where to save everytime.


the macro which i got in reply was this, mybe it can be a lil help
'------Start
Option Explicit

Sub SaveCopyOfSheet()
Dim strSaveAs As String
Dim strInitial As String
Dim strFilter As String

ActiveSheet.Copy
strInitial =3D "Book1_" & Format(Date, "yyyy_mm_dd") & ".xls"
strFilter =3D "Excel (*.xls), *.xls"
strSaveAs =3D
Application.GetSaveAsFilename(InitialFilename:=3Ds trInitial,
Filefilter:=3DstrFilter)
If strSaveAs < False Then
ActiveWorkbook.SaveAs Filename:=3D _
strSaveAs, FileFormat:=3DxlNormal, Password:=3D"",
WriteResPassword:=3D"", _
ReadOnlyRecommended:=3DFalse, CreateBackup:=3DFalse
ActiveWindow.Close
End If
If MsgBox("Close this document", vbQuestion + vbYesNo) =3D vbYes Then
ThisWorkbook.Saved =3D True
ThisWorkbook.Close
End If
End Sub
'------------ END

by:
Wouter Magr=E9


--
torpido
------------------------------------------------------------------------
torpido's Profile: http://www.excelforum.com/member.php...o&userid=26482
View this thread: http://www.excelforum.com/showthread...hreadid=474056