An slice of archiving code... trouble for me.. plz assist.

I am writing a piece of code for excel to back up a worksheet to a location before it runs another routine.

My problem is how to close the saved worksheet and activate the source worksheet.

Open_Name = ActiveWorkbook.FullName

My_date = Format$(Now, "mm-dd-yy")

Path = "C:codetestackup"

ActiveWorkbook.SaveAs Filename:=Path & "dave-" & My_date & ".xlsm", FileFormat:=xlOpenXMLWorkbookMacroEnabled

MsgBox ("File has been saved to " & Path & " as " & "dave-" & My_date & ".xlsm")

<><> the active workbook is now located in codetestackupdave-My_date
but I want to open and activate Open_Name and close Dave-my_date
please help. <><>

thanks for any help you folks can provide.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories