Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > microsoft.public.excel.programming > #109057 > unrolled thread

Programing to save who and when someone update the file

Started byS@bugomes <Sbugomes.11c4d828@excelbanter.com>
First post2016-07-08 03:51 +0100
Last post2016-07-08 13:49 -0400
Articles 5 — 3 participants

Back to article view | Back to microsoft.public.excel.programming


Contents

  Programing to save who and when someone update the file S@bugomes <Sbugomes.11c4d828@excelbanter.com> - 2016-07-08 03:51 +0100
    Re: Programing to save who and when someone update the file "Auric__" <not.my.real@email.address> - 2016-07-08 06:26 +0000
      Re: Programing to save who and when someone update the file GS <gs@v.invalid> - 2016-07-08 09:49 -0400
        Re: Programing to save who and when someone update the file "Auric__" <not.my.real@email.address> - 2016-07-08 17:28 +0000
          Re: Programing to save who and when someone update the file GS <gs@v.invalid> - 2016-07-08 13:49 -0400

#109057 — Programing to save who and when someone update the file

FromS@bugomes <Sbugomes.11c4d828@excelbanter.com>
Date2016-07-08 03:51 +0100
SubjectPrograming to save who and when someone update the file
Message-ID<Sbugomes.11c4d828@excelbanter.com>
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




-- 
S@bugomes

[toc] | [next] | [standalone]


#109058

From"Auric__" <not.my.real@email.address>
Date2016-07-08 06:26 +0000
Message-ID<XnsA63EEE64785DBauricauricauricauric@213.239.209.88>
In reply to#109057
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.

[toc] | [prev] | [next] | [standalone]


#109059

FromGS <gs@v.invalid>
Date2016-07-08 09:49 -0400
Message-ID<nlob1r$k3t$1@dont-email.me>
In reply to#109058
> 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

[toc] | [prev] | [next] | [standalone]


#109063

From"Auric__" <not.my.real@email.address>
Date2016-07-08 17:28 +0000
Message-ID<XnsA63F6A9F9AE8Aauricauricauricauric@213.239.209.88>
In reply to#109059
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?

[toc] | [prev] | [next] | [standalone]


#109064

FromGS <gs@v.invalid>
Date2016-07-08 13:49 -0400
Message-ID<nlop38$9nr$1@dont-email.me>
In reply to#109063
> 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

[toc] | [prev] | [standalone]


Back to top | Article view | microsoft.public.excel.programming


csiph-web