ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How many times this file edited (https://www.excelbanter.com/excel-programming/408333-how-many-times-file-edited.html)

Prem Soni

How many times this file edited
 
Hi All,

Can anybody tell me is there any way through that i can set a formula or
programming in excel file to get it know that "how many times this file
edited" and when it last modified?

Pls help me out if someone knows...

Prem Soni

Gary''s Student

How many times this file edited
 
Put the following in the workbook code area:

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Sheets("Sheet1").Activate
Set r1 = Range("A1")
Set r2 = Range("A2")
r1.Value = r1.Value + 1
r2.Value = Date
End Sub

I assume that "edited" means "changed and saved"
--
Gary''s Student - gsnu200775


"Prem Soni" wrote:

Hi All,

Can anybody tell me is there any way through that i can set a formula or
programming in excel file to get it know that "how many times this file
edited" and when it last modified?

Pls help me out if someone knows...

Prem Soni


Prem Soni

How many times this file edited
 
Hi Gary!

Thanks its working.

Now pls let me know this also how can i set this "How many Times this file
saved or modified" to 0 (zero)
I mean can i reset this value. I think u got what i want?

Prem Soni


"Gary''s Student" wrote:

Put the following in the workbook code area:

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Sheets("Sheet1").Activate
Set r1 = Range("A1")
Set r2 = Range("A2")
r1.Value = r1.Value + 1
r2.Value = Date
End Sub

I assume that "edited" means "changed and saved"
--
Gary''s Student - gsnu200775


"Prem Soni" wrote:

Hi All,

Can anybody tell me is there any way through that i can set a formula or
programming in excel file to get it know that "how many times this file
edited" and when it last modified?

Pls help me out if someone knows...

Prem Soni


Les

How many times this file edited
 
Hello Prem, you just change the number in the cell A1 to zero (0)
--
Les


"Prem Soni" wrote:

Hi Gary!

Thanks its working.

Now pls let me know this also how can i set this "How many Times this file
saved or modified" to 0 (zero)
I mean can i reset this value. I think u got what i want?

Prem Soni


"Gary''s Student" wrote:

Put the following in the workbook code area:

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Sheets("Sheet1").Activate
Set r1 = Range("A1")
Set r2 = Range("A2")
r1.Value = r1.Value + 1
r2.Value = Date
End Sub

I assume that "edited" means "changed and saved"
--
Gary''s Student - gsnu200775


"Prem Soni" wrote:

Hi All,

Can anybody tell me is there any way through that i can set a formula or
programming in excel file to get it know that "how many times this file
edited" and when it last modified?

Pls help me out if someone knows...

Prem Soni


Prem Soni

How many times this file edited
 
Its working !

Thanks Les

"Les" wrote:

Hello Prem, you just change the number in the cell A1 to zero (0)
--
Les


"Prem Soni" wrote:

Hi Gary!

Thanks its working.

Now pls let me know this also how can i set this "How many Times this file
saved or modified" to 0 (zero)
I mean can i reset this value. I think u got what i want?

Prem Soni


"Gary''s Student" wrote:

Put the following in the workbook code area:

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Sheets("Sheet1").Activate
Set r1 = Range("A1")
Set r2 = Range("A2")
r1.Value = r1.Value + 1
r2.Value = Date
End Sub

I assume that "edited" means "changed and saved"
--
Gary''s Student - gsnu200775


"Prem Soni" wrote:

Hi All,

Can anybody tell me is there any way through that i can set a formula or
programming in excel file to get it know that "how many times this file
edited" and when it last modified?

Pls help me out if someone knows...

Prem Soni



All times are GMT +1. The time now is 02:06 PM.

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