Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default auto save code for vb in excell

i got a workbook that several ppl use. i need the work book to auto save
every 5 or so min. i got a few macro's. dont wana just add it to a macro.
if sumthing hapens in between the macro's being used i want the data saved
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default auto save code for vb in excell

Tools Options... Save every 5 minutes
--
Gary''s Student - gsnu200730
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default auto save code for vb in excell

i work for a company with about 18 branches all over. it i go to tools etc
it will only safe my work on my computer. i email this worksheet to the
other branches and need theyr stuff to auto save as well. i can add a save
code to all my macro's but a powerfail or some happens and they did not run
any macro then all work will be lost


"Gary''s Student" wrote:

Tools Options... Save every 5 minutes
--
Gary''s Student - gsnu200730

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default auto save code for vb in excell

Put this in workbook code:

Private Sub Workbook_Open()
Application.AutoRecover.Enabled = True
Application.AutoRecover.Time = 5
End Sub

It will turn AutoSave for anyone opening the workbook. All users will be
safe.

REMEMBER: workbook code, not a standard module
--
Gary''s Student - gsnu200730


"pswanie" wrote:

i work for a company with about 18 branches all over. it i go to tools etc
it will only safe my work on my computer. i email this worksheet to the
other branches and need theyr stuff to auto save as well. i can add a save
code to all my macro's but a powerfail or some happens and they did not run
any macro then all work will be lost


"Gary''s Student" wrote:

Tools Options... Save every 5 minutes
--
Gary''s Student - gsnu200730

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default auto save code for vb in excell

sweet!!!

thanx


"Gary''s Student" wrote:

Put this in workbook code:

Private Sub Workbook_Open()
Application.AutoRecover.Enabled = True
Application.AutoRecover.Time = 5
End Sub

It will turn AutoSave for anyone opening the workbook. All users will be
safe.

REMEMBER: workbook code, not a standard module
--
Gary''s Student - gsnu200730


"pswanie" wrote:

i work for a company with about 18 branches all over. it i go to tools etc
it will only safe my work on my computer. i email this worksheet to the
other branches and need theyr stuff to auto save as well. i can add a save
code to all my macro's but a powerfail or some happens and they did not run
any macro then all work will be lost


"Gary''s Student" wrote:

Tools Options... Save every 5 minutes
--
Gary''s Student - gsnu200730



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default auto save code for vb in excell

I don't believe this will work for users of Excel 2000 or older.

Mike F
"Gary''s Student" wrote in message
...
Put this in workbook code:

Private Sub Workbook_Open()
Application.AutoRecover.Enabled = True
Application.AutoRecover.Time = 5
End Sub

It will turn AutoSave for anyone opening the workbook. All users will be
safe.

REMEMBER: workbook code, not a standard module
--
Gary''s Student - gsnu200730


"pswanie" wrote:

i work for a company with about 18 branches all over. it i go to tools
etc
it will only safe my work on my computer. i email this worksheet to the
other branches and need theyr stuff to auto save as well. i can add a
save
code to all my macro's but a powerfail or some happens and they did not
run
any macro then all work will be lost


"Gary''s Student" wrote:

Tools Options... Save every 5 minutes
--
Gary''s Student - gsnu200730



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default auto save code for vb in excell

Is there any alternative approach??
--
Gary''s Student - gsnu200730


"Mike Fogleman" wrote:

I don't believe this will work for users of Excel 2000 or older.

Mike F
"Gary''s Student" wrote in message
...
Put this in workbook code:

Private Sub Workbook_Open()
Application.AutoRecover.Enabled = True
Application.AutoRecover.Time = 5
End Sub

It will turn AutoSave for anyone opening the workbook. All users will be
safe.

REMEMBER: workbook code, not a standard module
--
Gary''s Student - gsnu200730


"pswanie" wrote:

i work for a company with about 18 branches all over. it i go to tools
etc
it will only safe my work on my computer. i email this worksheet to the
other branches and need theyr stuff to auto save as well. i can add a
save
code to all my macro's but a powerfail or some happens and they did not
run
any macro then all work will be lost


"Gary''s Student" wrote:

Tools Options... Save every 5 minutes
--
Gary''s Student - gsnu200730




  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default auto save code for vb in excell

as much as i hate to say it...

that code did not seem to work? i used ur next reply to get to the workbook
code and past the code in there

then i enterd some info and let it rest.

when i came back i closed the workbook and upon being asked to save i said
no. (the code should have done that 3 times in the 40 minites that i left)

i reopend the workbook and the info have not been saved..




"Gary''s Student" wrote:

Put this in workbook code:

Private Sub Workbook_Open()
Application.AutoRecover.Enabled = True
Application.AutoRecover.Time = 5
End Sub

It will turn AutoSave for anyone opening the workbook. All users will be
safe.

REMEMBER: workbook code, not a standard module
--
Gary''s Student - gsnu200730


"pswanie" wrote:

i work for a company with about 18 branches all over. it i go to tools etc
it will only safe my work on my computer. i email this worksheet to the
other branches and need theyr stuff to auto save as well. i can add a save
code to all my macro's but a powerfail or some happens and they did not run
any macro then all work will be lost


"Gary''s Student" wrote:

Tools Options... Save every 5 minutes
--
Gary''s Student - gsnu200730

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default auto save code for vb in excell

You are confused about autosave and autorecover.

Autorecover just saves a backup which you can recover if Excel crashes, but when
you close the file normally, the autorecover files are deleted.

See Dave Peterson's response.


Gord Dibben MS Excel MVP

On Sun, 17 Jun 2007 08:19:00 -0700, pswanie
wrote:

as much as i hate to say it...

that code did not seem to work? i used ur next reply to get to the workbook
code and past the code in there

then i enterd some info and let it rest.

when i came back i closed the workbook and upon being asked to save i said
no. (the code should have done that 3 times in the 40 minites that i left)

i reopend the workbook and the info have not been saved..




"Gary''s Student" wrote:

Put this in workbook code:

Private Sub Workbook_Open()
Application.AutoRecover.Enabled = True
Application.AutoRecover.Time = 5
End Sub

It will turn AutoSave for anyone opening the workbook. All users will be
safe.

REMEMBER: workbook code, not a standard module
--
Gary''s Student - gsnu200730


"pswanie" wrote:

i work for a company with about 18 branches all over. it i go to tools etc
it will only safe my work on my computer. i email this worksheet to the
other branches and need theyr stuff to auto save as well. i can add a save
code to all my macro's but a powerfail or some happens and they did not run
any macro then all work will be lost


"Gary''s Student" wrote:

Tools Options... Save every 5 minutes
--
Gary''s Student - gsnu200730


  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default auto save code for vb in excell

wups!!!!

how do i paste that code in the workbook code?


sowi...

"pswanie" wrote:

i got a workbook that several ppl use. i need the work book to auto save
every 5 or so min. i got a few macro's. dont wana just add it to a macro.
if sumthing hapens in between the macro's being used i want the data saved



  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default auto save code for vb in excell

1. Go to the menu bar at the top of the window ( File Edit View Insert ...)
2. Right-click the small worksheet icon to the immediate left of File
3. Select View code
4. Paste the stuff in
--
Gary''s Student - gsnu200730


"pswanie" wrote:

wups!!!!

how do i paste that code in the workbook code?


sowi...

"pswanie" wrote:

i got a workbook that several ppl use. i need the work book to auto save
every 5 or so min. i got a few macro's. dont wana just add it to a macro.
if sumthing hapens in between the macro's being used i want the data saved

  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default auto save code for vb in excell

xl2k and below came with an optional addin called AutoSave.xla. It could be set
to save every x minutes (user selectable). And it just saves the file at those
intervals.

xl2002+ comes with something called autorecovery. It's also optional, but if
the user turns it on, it saves a copy of that workbook in a special location
(also user selectable). If windows or excel crash, then the next time excel
opens, it notices that there's a file in that location. Excel prompts the user
to see if he/she wants to recover that file that was saved when excel/windows
crashed.

This autorecovery feature isn't used for the same purpose as AutoSave.

(If you have a copy of autosave.xla from a previous version, it'll work with
xl2002+, too.)

But since you don't want to have the user select options to turn on autosave,
you may find adding an ontime macro that runs every so often to your workbook's
project.

Chip Pearson explains how to use application.ontime:
http://www.cpearson.com/excel/ontime.htm



pswanie wrote:

i got a workbook that several ppl use. i need the work book to auto save
every 5 or so min. i got a few macro's. dont wana just add it to a macro.
if sumthing hapens in between the macro's being used i want the data saved


--

Dave Peterson
  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default auto save code for vb in excell

i used the code from that link but got a error. i guess its the 'initiate
the first ontime that i need to add. how do i go about with that? do i just
copy that code to a module? this is wat i did:

Sub saveworkbook()
'
' saveworkbook Macro
' Macro recorded 2007/06/17 by Knysna
'

'
ActiveWorkbook.Save
End Sub




Public RunWhen As Double
Public Const cRunIntervalSeconds = 300 ' two minutes
Public Const cRunWhat = "saveworkbook"


i then get:

compile error

only comments... etc


thanx

"Dave Peterson" wrote:

xl2k and below came with an optional addin called AutoSave.xla. It could be set
to save every x minutes (user selectable). And it just saves the file at those
intervals.

xl2002+ comes with something called autorecovery. It's also optional, but if
the user turns it on, it saves a copy of that workbook in a special location
(also user selectable). If windows or excel crash, then the next time excel
opens, it notices that there's a file in that location. Excel prompts the user
to see if he/she wants to recover that file that was saved when excel/windows
crashed.

This autorecovery feature isn't used for the same purpose as AutoSave.

(If you have a copy of autosave.xla from a previous version, it'll work with
xl2002+, too.)

But since you don't want to have the user select options to turn on autosave,
you may find adding an ontime macro that runs every so often to your workbook's
project.

Chip Pearson explains how to use application.ontime:
http://www.cpearson.com/excel/ontime.htm



pswanie wrote:

i got a workbook that several ppl use. i need the work book to auto save
every 5 or so min. i got a few macro's. dont wana just add it to a macro.
if sumthing hapens in between the macro's being used i want the data saved


--

Dave Peterson

  #14   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default auto save code for vb in excell

Answered in the other post.

pswanie wrote:

i used the code from that link but got a error. i guess its the 'initiate
the first ontime that i need to add. how do i go about with that? do i just
copy that code to a module? this is wat i did:

Sub saveworkbook()
'
' saveworkbook Macro
' Macro recorded 2007/06/17 by Knysna
'

'
ActiveWorkbook.Save
End Sub

Public RunWhen As Double
Public Const cRunIntervalSeconds = 300 ' two minutes
Public Const cRunWhat = "saveworkbook"

i then get:

compile error

only comments... etc

thanx

"Dave Peterson" wrote:

xl2k and below came with an optional addin called AutoSave.xla. It could be set
to save every x minutes (user selectable). And it just saves the file at those
intervals.

xl2002+ comes with something called autorecovery. It's also optional, but if
the user turns it on, it saves a copy of that workbook in a special location
(also user selectable). If windows or excel crash, then the next time excel
opens, it notices that there's a file in that location. Excel prompts the user
to see if he/she wants to recover that file that was saved when excel/windows
crashed.

This autorecovery feature isn't used for the same purpose as AutoSave.

(If you have a copy of autosave.xla from a previous version, it'll work with
xl2002+, too.)

But since you don't want to have the user select options to turn on autosave,
you may find adding an ontime macro that runs every so often to your workbook's
project.

Chip Pearson explains how to use application.ontime:
http://www.cpearson.com/excel/ontime.htm



pswanie wrote:

i got a workbook that several ppl use. i need the work book to auto save
every 5 or so min. i got a few macro's. dont wana just add it to a macro.
if sumthing hapens in between the macro's being used i want the data saved


--

Dave Peterson


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto save as text and close in code? GD New Users to Excel 2 May 18th 09 08:33 PM
auto locking of excell workbook (excell 2003) cheekymonkey Excel Discussion (Misc queries) 2 November 14th 08 11:50 PM
How to AUTO SAVE as opposed to turning on auto recovery: EXCEL T-mo Excel Discussion (Misc queries) 1 January 12th 06 10:16 PM
Totally Disabling (^ save ) (Save as) and Save Icon – Which code do I use: harpscardiff[_10_] Excel Programming 8 November 10th 05 12:24 PM
Auto Excel workbook close: save= false during an auto subroutine tomwashere2 Excel Programming 10 June 16th 05 06:23 AM


All times are GMT +1. The time now is 02:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"