ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Close Code possible? (https://www.excelbanter.com/excel-programming/427462-close-code-possible.html)

LiAD

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

Chip Pearson

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


LiAD

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



LiAD

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




All times are GMT +1. The time now is 01:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com