Track Changes via Macro

ManSim

New Member
Joined
Mar 23, 2010
Messages
2
Hi all,
I am brandnew to VBA but learn a bit more every day. Now I have the following problem that needs your help:
I have about 15 different excel inventories and need to check every Monday if changes were made in the last week. All files are shared hence "tracking changes" is basically possible.
Now instead of clicking the mouse so many times I attempted to start recording a macro to ease my work. The result was the following code:
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p>
Sub TrackChanges()
'
' TrackChanges Macro
'
<o:p> </o:p>
'
With ActiveWorkbook
.HighlightChangesOptions When:="15.03.2010"
.ListChangesOnNewSheet = True
.HighlightChangesOnScreen = True
End With
End Sub
<o:p> </o:p>
<o:p> </o:p>
Unfortunately this macro does not really work - nothing happens! What is wrong with this?
<o:p> </o:p>
PS. At a later stage I want to replace the hard coded date with an input msgbox...

Much appreciate any comment.
Thanks in advance
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Hi arkusM,

I tried your code and it works really great. Can you add some line that tracks the users if he/she add some information to all worksheets and list all those additional information in the trackers.

Thanks a lot.

Regards.


 
Upvote 0
Hi arkusM,

I tried your code and it works really great. Can you add some line that tracks the users if he/she add some information to all worksheets and list all those additional information in the trackers.

Thanks a lot.

Regards.




Prima,

In the code there is this bit that if you comment out will track EVERYTHING.

Code:
'Precursor Exits
    'Other conditions that you do not want to tracke could be added here
    If vOldValue = "" Then Exit Sub    'If you comment out this line *every* entry will be recorded
 
Upvote 0
Hi arkusM,

I tried to remove the comment block, it gives me a "Compile Error".

What should I do?

Thanks.
 
Upvote 0
That works great. Is there a way to add 2 columns, one that will put the DTG of the change, and one that can read the username from the computer and put that in a column?
 
Upvote 0
That works great. Is there a way to add 2 columns, one that will put the DTG of the change, and one that can read the username from the computer and put that in a column?


Not sure what you mean by DTG. (even after googling it )
And the User name is already tracked.
 
Upvote 0
DTG is Date Time Group, so it would be in format of 20100406 10:59:59

Time and Date are Tracked in seperate columns.

Code:
            .Offset(0, 6) = Time
            .Offset(0, 7) = Date

Could be sub'd with .offset(0,6) = Now
and format the column to display as you wish.
 
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,201
Members
453,022
Latest member
RobertV1609

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top