Automatic saving of worksheet with unique names

  • Thread starter Thread starter oystlars
  • Start date Start date
O

oystlars

I have a computer running 24/7 and multiple people are writing items to
a list (worksheet).

It is important that it is saved several times a day, let's say at
10am, 12am and 14am.. And preferably to a specific location and with
uniqe filenames.

I have come up with this so far:

ThisWorkbook.SaveAs Filename:=Format(Now, "yymmdd_h­hmmss") & ".xls"

Can anybody help me out?

Best regards, Øystein
 
Hi Øystein

Maybe SaveCopyAs is a better option for you
Your original workbook stay open and you save a copy in a
different folder

ThisWorkbook.SaveCopyAs Filename:="C:\Data\" & Format(Now, "yymmdd_h­hmmss") & ".xls"

You can run the code automatic every two hours if you want
Look here
http://www.cpearson.com/excel/ontime.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl


I have a computer running 24/7 and multiple people are writing items to
a list (worksheet).

It is important that it is saved several times a day, let's say at
10am, 12am and 14am.. And preferably to a specific location and with
uniqe filenames.

I have come up with this so far:

ThisWorkbook.SaveAs Filename:=Format(Now, "yymmdd_h­hmmss") & ".xls"

Can anybody help me out?

Best regards, Øystein
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top