Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 1
Angry 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 538
Default 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.
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 538
Default 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?
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default 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

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
Save file with different name and dont update the links when opened again [email protected] Excel Discussion (Misc queries) 0 January 25th 07 10:09 PM
Save file with different name and dont update the links when opened again [email protected] Excel Discussion (Misc queries) 0 January 25th 07 10:09 PM
Save file with different name and dont update the links when opened again [email protected] Excel Discussion (Misc queries) 0 January 25th 07 10:09 PM
Save excel as web page and have htm file update automatically Kryer Excel Programming 0 July 26th 06 12:03 AM
Automate open file, update links, run macro, close and save file Geoff[_7_] Excel Programming 2 August 26th 03 10:13 PM


All times are GMT +1. The time now is 08:27 AM.

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

About Us

"It's about Microsoft Excel"