ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Programing to save who and when someone update the file (https://www.excelbanter.com/excel-programming/451537-programing-save-who-when-someone-update-file.html)

S@bugomes

Programing to save who and when someone update the file
 
I'm trying to programing the file to save in the column "R" and "S" the timing and user who updated the file, but this only works for updating in the first column...how can I do to works in all colums (from A to Q)?


Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo TratarErro

If Target.Column = 1 And Target.Value < "" Then


Application.ScreenUpdating = False

Target.Offset(0, 1).Value = Now()
Target.Offset(0, 2).Value = VBA.Environ("username")
End If

TratarErro:

Application.ScreenUpdating = True
End Sub

Auric__

Programing to save who and when someone update the file
 
S@bugomes wrote:

I'm trying to programing the file to save in the column "R" and "S" the
timing and user who updated the file, but this only works for updating
in the first column...how can I do to works in all colums (from A to
Q)?


Here's some code I wrote a few years back that tracks changes. It's not
exactly what you want, but you should be able to modify it to suit your
needs. Usage instructions are included at the start of the file.

http://auric.altervista.org/excel/track_changes.bas

--
- Good nap?
- Just checking the lids for leaks.

GS[_6_]

Programing to save who and when someone update the file
 
S@bugomes wrote:

I'm trying to programing the file to save in the column "R" and "S"
the timing and user who updated the file, but this only works for
updating in the first column...how can I do to works in all colums
(from A to Q)?


Here's some code I wrote a few years back that tracks changes. It's
not exactly what you want, but you should be able to modify it to
suit your needs. Usage instructions are included at the start of the
file.

http://auric.altervista.org/excel/track_changes.bas


Nice!!

Have you seen J-Walk's code to 'Undo' VBA changes?

--
Garry

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

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


Auric__

Programing to save who and when someone update the file
 
GS wrote:

S@bugomes wrote:

I'm trying to programing the file to save in the column "R" and "S"
the timing and user who updated the file, but this only works for
updating in the first column...how can I do to works in all colums
(from A to Q)?


Here's some code I wrote a few years back that tracks changes. It's
not exactly what you want, but you should be able to modify it to
suit your needs. Usage instructions are included at the start of the
file.

http://auric.altervista.org/excel/track_changes.bas


Nice!!

Have you seen J-Walk's code to 'Undo' VBA changes?


Not before you mentioned it, no. It looks interesting.

A few years back (well... 12 years) I asked how to avoid clearing the undo
stack when running macros. I'll have to play around with that code, see what
develops.

--
You got a plan already?

GS[_6_]

Programing to save who and when someone update the file
 
GS wrote:

S@bugomes wrote:

I'm trying to programing the file to save in the column "R" and
"S" the timing and user who updated the file, but this only works
for updating in the first column...how can I do to works in all
colums (from A to Q)?

Here's some code I wrote a few years back that tracks changes. It's
not exactly what you want, but you should be able to modify it to
suit your needs. Usage instructions are included at the start of
the file.

http://auric.altervista.org/excel/track_changes.bas


Nice!!

Have you seen J-Walk's code to 'Undo' VBA changes?


Not before you mentioned it, no. It looks interesting.

A few years back (well... 12 years) I asked how to avoid clearing the
undo stack when running macros. I'll have to play around with that
code, see what develops.


It's limited to how far back it goes, but I was able to store cell info
(address/data) on a hidden sheet in 2 cols. Undo worked bottom up and
shifted the data over to 2 cols for Redo!

This potentially has unlimited ability since it doesn't use the buffer
for storage. The 'history' list took a bit of work trying to dupe the
Excel menu dropdowns, but once done it's all reusable...

--
Garry

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

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



All times are GMT +1. The time now is 08:53 PM.

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