View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
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