ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Forcing save on shared doccument (https://www.excelbanter.com/excel-programming/449840-forcing-save-shared-doccument.html)

Pistolade

Forcing save on shared doccument
 
Is there a way to code the macro so that any time a user makes a change (and deselects the cell) the file will save? I'm trying to make a sort of live updating shared document.
Thanks,
Pistolade

Auric__

Forcing save on shared doccument
 
Pistolade wrote:

Is there a way to code the macro so that any time a user makes a change
(and deselects the cell) the file will save? I'm trying to make a sort
of live updating shared document.


Put this in the workbook's ThisWorkbook pbject:

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Me.Save
End Sub

AFAIK this will only fire when the *contents* of a cell are changed. Things
like formatting changes (bold, italics, fonts, etc.) will *not* fire this
event.

--
These hands! I can't get them off my wrists! Oh, God!

GS[_2_]

Forcing save on shared doccument
 
Pistolade wrote:

Is there a way to code the macro so that any time a user makes a
change (and deselects the cell) the file will save? I'm trying to
make a sort of live updating shared document.


Put this in the workbook's ThisWorkbook pbject:

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target
As Range) Me.Save
End Sub

AFAIK this will only fire when the *contents* of a cell are changed.
Things like formatting changes (bold, italics, fonts, etc.) will
*not* fire this event.


True so long as the formatting isn't done via RTF feature in EditMode!

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion




All times are GMT +1. The time now is 05:35 AM.

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