Please see the attached file

 

I declare a public range variable which will set by Target Range on
Worksheet Change Event 

At before Close worbook Event Pubic Variable will have a Name rngLastRecord 

At Workbook Open , Msgbox will Display the Information about rngLastRecord
Range and Will Delete this name from Workbook

 

Private Sub Workbook_BeforeClose(Cancel As Boolean)

    If Not rngCell Is Nothing Then rngCell.Name = "rngLastRecord"

End Sub

 

Private Sub Workbook_Open()

    

    

    MsgBox "Last Updated Record in" & vbCrLf & _

            "Row =" & Range("rngLastRecord").Row & vbCrLf & _

            "Column =" & Range("rngLastRecord").Column & vbCrLf & _

            "Value =" & Range("rngLastRecord").Value

    

    On Error GoTo ExitEarly:

   Me.Names("rngLastRecord").Delete

 

ExitEarly:

If Err.Number <> 0 Then

MsgBox "No Record was edited last time", vbInformation

Err.Clear

End If

End Sub

 

 

 

Regards

Rajan verma

+91 7838100659 [IM-Gtalk]

 

From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com]
On Behalf Of Shekhar Sharma
Sent: 07 May 2012 4:23
To: excel-macros@googlegroups.com
Subject: Re: $$Excel-Macros$$ need Macro

 

Hi Chetan,

 

You can create a log tab in your workbook and place the code in "This
workbook" section of that excel on Close event to update that log with
username and time.

 

Regards

Shekhar Sharma

On Mon, May 7, 2012 at 1:25 AM, B.N.Chethan Kumar
<chetankumar1...@gmail.com> wrote:

Dear Excel Gurus,

 

I need BIG help from all of you. Help me with code which record saved last
date & Time along with the user name(Window). These is very Urgent request
from my BOSS.

 

Hope to hear soon,

-- 
B.N Chetan kumar

-- 
FORUM RULES (986+ members already BANNED for violation)
 
1) Use concise, accurate thread titles. Poor thread titles, like Please
Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will
not get quick attention or may not be answered.
 
2) Don't post a question in the thread of another member.
 
3) Don't post questions regarding breaking or bypassing any security
measure.
 
4) Acknowledge the responses you receive, good or bad.
 
5) Cross-promotion of, or links to, forums competitive to this forum in
signatures are prohibited. 
 
NOTE : Don't ever post personal or confidential data in a workbook. Forum
owners and members are not responsible for any loss.
 
----------------------------------------------------------------------------
--------------------------
To post to this group, send email to excel-macros@googlegroups.com




-- 
Shekhar Sharma
9910010060
"Life consists not in holding good cards but in playing 
those  you hold well" 
 "Before you judge another, think of your own last mistake."

-- 
FORUM RULES (986+ members already BANNED for violation)
 
1) Use concise, accurate thread titles. Poor thread titles, like Please
Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will
not get quick attention or may not be answered.
 
2) Don't post a question in the thread of another member.
 
3) Don't post questions regarding breaking or bypassing any security
measure.
 
4) Acknowledge the responses you receive, good or bad.
 
5) Cross-promotion of, or links to, forums competitive to this forum in
signatures are prohibited. 
 
NOTE : Don't ever post personal or confidential data in a workbook. Forum
owners and members are not responsible for any loss.
 
----------------------------------------------------------------------------
--------------------------
To post to this group, send email to excel-macros@googlegroups.com

-- 
FORUM RULES (986+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

------------------------------------------------------------------------------------------------------
To post to this group, send email to excel-macros@googlegroups.com

Attachment: Book2.xlsm
Description: application/vnd.ms-excel.sheet.macroenabled.12

Reply via email to