Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Setup / November 2006

Tip: Looking for answers? Try searching our database.

autosave function

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
AdinaC - 14 Nov 2006 01:54 GMT
Hello.  I am setting up a worksheet that i need to allow others to access.  I
have to be able to guarantee that the data they add is saved.  I want to
create an autosave feature so that if the user does not save the document on
their own, it will save automatically when they close it.  I have Excel 2003,
and have tried following some of the other people's questions about
downloading add in's from previous versions, but I don't get it.  Having
Excel autosave every ... minutes doesn't help because I need to be able to
guarantee that any added data is saved before - or when - closing.

Thanks,

Adina
Bob Phillips - 14 Nov 2006 10:16 GMT
You don't need an add-in for this, just add this code to the workbook

Private Sub Workbook_BeforeClose(Cancel As Boolean)
   ThisWorkbook.Save
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

> Hello.  I am setting up a worksheet that i need to allow others to access.  I
> have to be able to guarantee that the data they add is saved.  I want to
[quoted text clipped - 8 lines]
>
> Adina
AdinaC - 16 Nov 2006 00:02 GMT
Hi Bob,

Thank you for helping me.  I did what you said, right click on Excel icon,
choose view code, but there is no where to paste.  All I get is a greyed-out
screen with a few edit icons.  Where do I paste?

Thanks,

Adina

> You don't need an add-in for this, just add this code to the workbook
>
[quoted text clipped - 30 lines]
> >
> > Adina
Bob Phillips - 16 Nov 2006 09:36 GMT
Make sure that the ThisWorkbook code module is showing, double-click the
item in the explorer pane if not.

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

> Hi Bob,
>
[quoted text clipped - 40 lines]
> > >
> > > Adina
AdinaC - 17 Nov 2006 19:52 GMT
Hi Bob,

You are the BEST!!!!!  I couldn't paste the macro the first time.  When I
tried to go into visual basic, it told me I didn't have enough memory..  I
thought it was just my computer, so we pasted your macro on another computer
and it worked.  When I tried to open the shared file on my computer, that is
when Excel told me to change the security. Apparently it was set to high.  
Now I have it on medium so I can choose whether or not to use the macro, and
it works great.  We tested it, and it saved the data and didn't even require
the user to choose "yes" or anything.  It just saved it without you knowing
and then when I opened it back up, there was the data.  Thanks again, you are
the best!!

Adina

> Make sure that the ThisWorkbook code module is showing, double-click the
> item in the explorer pane if not.
[quoted text clipped - 58 lines]
> > > >
> > > > Adina
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.