Free Microsoft Excel 2013
Quick Reference
Free Microsoft 2013 Quick Reference Guide

Free Microsoft Excel 2013 Quick Reference

Autosave every 5 minutes

How would you code it so that a workbook saves every 5 minutes after you open the workbook? I almost got it to work but the VBA would open up the workbook and automatically save itself. I need it so that once its closed, it doesn't re-open and save.
THe code i used is from this link: http://www.vbaexpress.com/kb/getarticle.php?kb_id=265

Thank you


Post your answer or comment

comments powered by Disqus
I'm trying to write a macro in excel that will save the document every couple of minutes. After searching the forums here for a bit I found something that might work:

Sub test()
newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 30
waittime = TimeSerial(newHour, newMinute, newSecond)

Do
ActiveWorkbook.Save
Loop
End Sub

The only thing about this is that it runs constantly and won't stop saving. Is there a way to do this where it will only save every 5 minutes or so???

Have read several good answers regarding AutoSave but can't get mine to make
any changes. Using WinXP PRO - O.S. and brought the AutoSave in from W/2000
Excel/ Works good / BUT it's set for 10 Minutes and "Prompt for Save". Want
to change it to save every 5 minuters and NO PROMPT to SAVE, Just
automatically save it.
Anyone know the secret to getting a permanent change done as I've tried just
about everything-Gone to Tools, Options, Save / Edit, Etc., and done other
things - BUT - No Results as to making the change permanent from 10 Minutes
and to Prompt TO 5 Minutes and NO PROMPT. I've changed it just about every
time I open Excel to 5 Minutes and NO PROMPT BUT it always comes back to the
10 Minutes and PROMPT.
All help appreciated.
Thanks /Valerie /

Have read several good answers regarding AutoSave but can't get mine to make
any changes. Using WinXP PRO - O.S. and brought the AutoSave in from W/2000
Excel/ Works good / BUT it's set for 10 Minutes and "Prompt for Save". Want
to change it to save every 5 minuters and NO PROMPT to SAVE, Just
automatically save it.
Anyone know the secret to getting a permanent change done as I've tried just
about everything-Gone to Tools, Options, Save / Edit, Etc., and done other
things - BUT - No Results as to making the change permanent from 10 Minutes
and to Prompt TO 5 Minutes and NO PROMPT. I've changed it just about every
time I open Excel to 5 Minutes and NO PROMPT BUT it always comes back to the
10 Minutes and PROMPT.
All help appreciated.
Thanks /Valerie / shornlake@sbcglobal.net

I have a simple macro that I run when I hit "Ctr Q".

How do I ensure that this macro runs every 5 minutes automatically from the first time I hit "Ctr-Q". Currently, it only runs once and then stops.

Here's my macro for your view:


	VB:
	
 Macro1() 
     '
     ' Macro1 Macro
     ' Macro recorded 08-09-2006 by Scott
     '
     ' Keyboard Shortcut: Ctrl+q
     '
    Range("B6").Select 
    ActiveCell.FormulaR1C1 = "NOW()" 
    Range("B6").Select 
    ActiveCell.FormulaR1C1 = "=NOW()" 
    Range("A4").Select 
End Sub 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines
Thanks,
Atheobody

I have the following code which is SUPPOSED to do a copy paster every 5 minutes but is, instead doing it every 1 or so minutes (randomly). Any idea what I screwed up?


	VB:
	
 Workbook_Open() 
    Application.OnTime Now + TimeValue("00:05:00"), "IntraDayCopy" 
End Sub 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines

	VB:
	
 IntraDayCopy() 
    Dim wb As Workbook 
    Dim ws As Worksheet 
    Dim ID As Integer 
     
    Application.ScreenUpdating = False 
    Set wb = Workbooks("Focus Portfolio 6.8 - Dan.xls") 
    Set ws = wb.Worksheets("IntraDay") 
    Set wg = wb.Worksheets("G&I") 
    Set wr = wb.Worksheets("Growth") 
    ID = Hour(Time) 
     
    If ID > 6 And ID < 13 Then 
         
        dTime = Now + TimeValue("00:05:00") 
         
        Application.OnTime dTime, "IntraDayCopy" 
        With ws 
            .Range("2:2").Copy 
            .Range("3:3").Insert Shift:=xlDown 
             
            .Range("E1:F1").Copy 
            .Range("A3:B3").PasteSpecial Paste:=xlPasteValues 
             
             'Copy G&I Amount
            wg.Range("X168").Copy 
            .Range("C3").PasteSpecial Paste:=xlPasteValues 
             
             'Copy Growth Amount
            wr.Range("W116").Copy 
            .Range("D3").PasteSpecial Paste:=xlPasteValues 
        End With 
         
        Application.ScreenUpdating = True 
         
    End If 
End Sub 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines


I have a button which runs a lot of macros and I would like to create something which runs all of these macros automatically every 5 minutes, is this possible?

Thanks.

Hi,
I want to run the following macro on multiple files every 5 minutes. How do I do this elegantly without repeating the code multiple times?
Sub test()

ReturnValue = Shell("c:program filesTeleport Ultraultra.exe ""D:myfoldermyfile1.tpu"" ""/r""", 1)

End Sub

Additional Info.
I've got 1000's of .tpu files & their names are myfile1.tpu, myfile2.tpu, myfile3.tpu, etc.
I need to launch each file every 5 minutes one after the other.

Thanks for your kind assistance.

Hi there, I have the following macro:

sub call()
Dim T, When
T = Now()
When = TimeValue(Hour(T) & ":" & Minute(T) + (5 - (Minute(T) Mod 5)) & ":00")
Application.OnTime earliesttime:=When, Procedure:="fiveminutes", Schedule:=True
end sub

The macro above runs every 5 minutes from the whole hour.

The thing is it is not working good at the whole hour, because 00 minutes is not a part of 5 minute. I was thinking about running application.ontime for the whole hours but have not figures a way out.
I tried an 'if then' macro but application.ontime does not seem to work within the 'if then' macro.
So want to call the fiveminutes macro every 5 minutes from the whole hour(09:55,10:00,10:05,10:10 etc.) but have not been able to get it working properly. I know I can hard code it but does anyone have a shorter solution? Any one have any suggestions?

thanks

RS

I have workbook1 open in which cells are linked to workbook2.
Workbook2 is updated frequently.

Is there a way to update links in workbook1 every 5 minutes as long as it is open?

Please help

Thanks

How can a macro be run every 5 minutes. Application.OnTime will let the macro run at a specific time but I need to run every 5 minutes.

Hi,

Could someone help me with some code that will run a check every 5 minutes, please? I already have the check code set up, but I need some code that will tell my excel sheet to update itself every 5 minutes. It has to compare the time in 2 adjacent cells (B5 and B6).

Kind regards,
Zjak

Hello,
I'd like to ask about one problem, I need record some data and my macro should run every 5 minutes and this data record on new row, I know how to run macro on every 5 minutes :
    RunWhen = Now + TimeValue("00:05:00")
    Application.OnTime earliesttime:=RunWhen, procedure:=RunWhat, schedule:=True
and I know how to record data on new row :
    Dim e As Long
    For e = 1 To 10
my marco
Sheets("results").Select
Range("B" & e).PasteSpecial Paste:=xlPasteValues
next e
but together It doesnt work could anyone help me please?

I need a code that will automatically save the spreadsheet every 5 minutes, i dont want to use auto save, i want a code written in as the auto save dosent work for what i want.

Thanks

FBF

Hi

Im wondering if anyone can help me I am trying to add a macro to my spreadsheet which will autosave the file every 5 minutes and save it with a date and time stamp to its original location.

Many thanks
cotw

Hello,

I have a macro named "copystatus" that has to run every 5 minutes if a cell in a worksheet is TRUE. Else, it should not run. How can I make this possible?

I thank you all in advance

Gentlemen:

How can I modify this code to Auto Save my current workbook every 10 minutes.

Public Sub SaveAll()

Dim WB As Workbook
For Each WB In Workbooks
WB.Save
Next WB
Application.StatusBar = "All Workbooks Saved."

End Sub

Thanks

Macro to save the worksheet every 5min

A macros is needed to:

1. save the worksheet under the same name
(& variation: under diff name - e.g. quotes_HHMM.xls ,
where HH is hour and MM is minutes of the time the file is saved)

2. every 5 minutes (the file is opened at 9AM and closed at 6PM manually)

I have a file, where the financial data is streamed in from Reuters.

Hi!

I have an excel file stored on a network drive for the purpose of information sharing. (File protected with a password)

But some the guys leave the file open for quiet long time and hence I cannot open the file for updating the data.

-I need to have a macro that runs every 5 minutes and displays an alert message saying "Please close the File" as long as the file is kept open.

-A second macro with a modified version of the above to close the file automatically after 5 minutes from file opening time after showing an alert message "You cannot leave the File Open, File is Closed Automatically!!!!!"

Thanks in advance

Hi all,

We have 4 files which are used by about 6 different people. Sometimes user1 will open file1 and go off for a meeting leaving it open, then other users can't get into the file.

I've thought about using the Shared function, but this just won't work in this case.

Does anyone have any code which will check the file status, say every 5 minutes, and if it's not changed in that time close the file ? I've tried "educating" the users, but they're all as bad as each other ( me included ).

There are a few other macros in the file which are used to create different reports, update sheets etc, so having a macro constantly running wouldn't be an option.

TIA,

Iain

Greetings and thanks you for this great forum -

I have soil moisture data collected every 5 minutes from 8 probes. The data spans 3 months, making a large spreadsheet with 22791 lines - see attached sample.

I primarily want to extract only values collected for the probes on the hour. Secondarily I want to be able to play with the summary format and may want to extract the probe values say every 4 hours on the hour. All of this is aimed at producing nice summary graphs.

I may want to take a mean every hour or every 4 hours, but I don't want to get greedy on my first post

Thanks kindly - Mike Friggens

Is it possible to automatically run a macro after a certain amount of time.

Basically i want a Macro to run and then the workbook saved every 5 minutes automatically.

Is this possible?

Benn

Is there a way to have a macro running in the background allowing me to run other macros and do everything else needed in excel that will attempt to run a macro every 30 minutes? and if it fails to run it will try again every 5 minutes.

Excel 2007 is the version i am using.

Hello.
I have a spreadsheet that people need to load, [statstemplate.xls], which asks for there first name [A1] and last name [A2] of the person and basically they fill in the data, then click new work [macro], which creates a new work line for them, but i need it to save with the following info:

I need the [statstemplate.xls] to change to datefirstname_lastname.xls
so it would look like this 30052010joebloggs.xls
Also what i need as well is for it to create a folder for eg [ c:stats ]upon the first time they use the template, and if there is already a folder named that, that it doesnt say there is, it just autosaves in there.
Then every 5 minutes it auto saves in there.
So basically upon running the first macro it
a) creates a new folder
b) doesnt ask to create it, or say there is already a folder there
c) saves the statestemplate.xls as datefirstname_lastname.xls
d) autosaves every 5 minutes.

Thanks

Ok, i know this will take VB code. I am not a VB coder by any means. I am a Java coder.

Here is what i am looking to do.......

0 - 50 in a drop down menu. I need to increment 1 at a time when i choose a number every 5 minutes until 50 and stop. When i chose a number i need it to ask me for the timer settings. Example: 3 minutes until next increment. I need this in a popup after choosing the number. But it must be in minutes.....

This needs to work offline aswell. Using the System's time so when i close the excel doc and reopen it 2 hours later it takes in consideration that 2 hours has gone by and calculates correctly.

If anyone could help me get on the right track that would be great.


No luck finding an answer? You could always try Google.