Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 109
Default Determine if a workboo has been saved

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Determine if a workboo has been saved

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Determine if a workboo has been saved

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
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I recover an Excel document saved not saved as Darryl Excel Discussion (Misc queries) 6 January 5th 10 03:39 AM
Determine whether the user has saved the file? Tim879 Excel Programming 4 March 5th 08 05:35 PM
can i put a password on a folder rather than on each excel workboo sj Excel Discussion (Misc queries) 1 April 17th 07 03:49 PM
Going back from a hyperlink when it has changed to another workboo Mogge Excel Discussion (Misc queries) 0 August 28th 06 09:03 AM
Determine if XL file opened from Outlook or a saved file quartz[_2_] Excel Programming 1 September 16th 05 09:50 PM


All times are GMT +1. The time now is 04:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"