Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 386
Default Close Code possible?

Hi,

I have a workbook with three sheets in it. Is it possible to create a code
that will automatically save and close the file after 5 minutes of no
usage/activity?

The file is used to record deliveries, the user is just hittin macro buttons
which either add one or subtract one from each product type as they are
delivered and consumed.

Could anyone help me with a code please?

Thanks
LiAD
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Close Code possible?


I have code to do that at http://www.cpearson.com/Excel/TimedClose.htm

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)


On Fri, 24 Apr 2009 07:11:02 -0700, LiAD
wrote:

Hi,

I have a workbook with three sheets in it. Is it possible to create a code
that will automatically save and close the file after 5 minutes of no
usage/activity?

The file is used to record deliveries, the user is just hittin macro buttons
which either add one or subtract one from each product type as they are
delivered and consumed.

Could anyone help me with a code please?

Thanks
LiAD

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 386
Default Close Code possible?

Works fine thanks.

Is it possible to modify this so it closes excel and the file rather than
just the file?

Thanks

"Chip Pearson" wrote:


I have code to do that at http://www.cpearson.com/Excel/TimedClose.htm

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)


On Fri, 24 Apr 2009 07:11:02 -0700, LiAD
wrote:

Hi,

I have a workbook with three sheets in it. Is it possible to create a code
that will automatically save and close the file after 5 minutes of no
usage/activity?

The file is used to record deliveries, the user is just hittin macro buttons
which either add one or subtract one from each product type as they are
delivered and consumed.

Could anyone help me with a code please?

Thanks
LiAD


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 386
Default Close Code possible?

Hi,

It does work but now I'm trying to combine it with the rest of the codes I
have in this file and I can't get it to go with another one.

I have the code below to hide all the formula bars to limit the possibility
for the user to 'adapt' items on the file. How is it possible to combine
these codes with your code - I see your code does the opposite to this is
some cases if I understand it.

Sorry I'm useless with VB so this is getting past me.

Thanks a lot for your help
LiAD

application.OnKey "%{F11}","dummy"

and

Private mFormulaBar

Private Sub Workbook_BeforeClose()
Dim oCB As CommandBar
For Each oCB In Application.CommandBars
oCB.Enabled = True
Next oCB

Application.DisplayFormulaBar = mFormulaBar
End Sub

Private Sub Workbook_Open()
Dim oCB As CommandBar
For Each oCB In Application.CommandBars
oCB.Enabled = False
Next oCB

mFormulaBar = Application.DisplayFormulaBar
Application.DisplayFormulaBar = False
End Sub


"LiAD" wrote:

Works fine thanks.

Is it possible to modify this so it closes excel and the file rather than
just the file?

Thanks

"Chip Pearson" wrote:


I have code to do that at http://www.cpearson.com/Excel/TimedClose.htm

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)


On Fri, 24 Apr 2009 07:11:02 -0700, LiAD
wrote:

Hi,

I have a workbook with three sheets in it. Is it possible to create a code
that will automatically save and close the file after 5 minutes of no
usage/activity?

The file is used to record deliveries, the user is just hittin macro buttons
which either add one or subtract one from each product type as they are
delivered and consumed.

Could anyone help me with a code please?

Thanks
LiAD


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
Close 2007 add-in from code chris Excel Programming 1 April 30th 07 02:29 PM
how to close app in code? homer Excel Programming 3 October 5th 05 06:33 PM
VBA Code req to close all workbooks Neil Atkinson Excel Programming 0 September 23rd 05 11:06 AM
close code Shawn Excel Programming 1 September 20th 05 02:49 PM
Close VB in Code Paul Watkins[_2_] Excel Programming 2 December 17th 03 09:25 PM


All times are GMT +1. The time now is 06:46 AM.

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

About Us

"It's about Microsoft Excel"