PC Review


Reply
Thread Tools Rate Thread

Determine if a workboo has been saved

 
 
QuietMan
Guest
Posts: n/a
 
      9th Oct 2008
I trying to have a macro auto exceute to put the user name in a cell on a
worksheet each time the workbook is saved

Does anyone know how to do this?
--
Helping Is always a good thing
 
Reply With Quote
 
 
 
 
Mike H
Guest
Posts: n/a
 
      9th Oct 2008
Hi,

Alt+F11 to open VB editor. Double click 'this workbook' and paste this in on
the right

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Sheets("Sheet1").Range("a1").Value = Environ("Username")
End Sub

Mike

"QuietMan" wrote:

> I trying to have a macro auto exceute to put the user name in a cell on a
> worksheet each time the workbook is saved
>
> Does anyone know how to do this?
> --
> Helping Is always a good thing

 
Reply With Quote
 
Gord Dibben
Guest
Posts: n/a
 
      9th Oct 2008
Your description does not match your subject line but maybe........

Private Sub Workbook_BeforeSave(ByVal SaveAsUI _
As Boolean, Cancel As Boolean)
Sheets("Sheet1").Range("A1").Value = "Last Saved By " & Environ("UserName")
End Sub


Gord Dibben MS Excel MVP

On Thu, 9 Oct 2008 12:45:02 -0700, QuietMan
<(E-Mail Removed)> wrote:

>I trying to have a macro auto exceute to put the user name in a cell on a
>worksheet each time the workbook is saved
>
>Does anyone know how to do this?


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How To Determine Filename Saved Date Gary Microsoft Access VBA Modules 3 11th Oct 2009 02:03 PM
Determine whether the user has saved the file? Tim879 Microsoft Excel Programming 4 5th Mar 2008 05:35 PM
How to determine if Document has been saved =?Utf-8?B?SGVybWVz?= Microsoft Word Document Management 3 11th Oct 2006 10:27 AM
Determine who saved the file aaronfude@gmail.com Windows XP General 1 6th Jun 2006 01:18 AM
How do I determine a template in which a document was saved by so. =?Utf-8?B?TWlrZSBDb3Jjb3Jhbg==?= Microsoft Word Document Management 2 5th Apr 2005 05:15 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:53 PM.