View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
L.White L.White is offline
external usenet poster
 
Posts: 32
Default Last user to make a change

I don't know if it is getting mangeled or not. I see the following:


here it is again:


Private Sub Workbook_BeforeSave( _
ByVal SaveAsUI As Boolean, Cancel As _
Boolean)
With ThisWorkbook.Names
.Item("LastChange").RefersTo = "=""" & _
Format(Now(), "dd mmm yyyy") & """"
.Item("LastUser").RefersTo = Environ("username")
End With
End Sub


If that is different than the way you submitted it to Google then would you
please go ahead and forward it to me directly. Again, thank you very much
for your help. I really do appreciate it.

LWhite

"Tom Ogilvy" wrote in message
...
the code was copied from the the workbook module of a workbook where it
was
working very well. Certainly no compile errors, so the only conclusion
would be that the code you have is not identical to the code posted.
Google has been known to put in stray hyphens in the code (if you copy it
from the posting) and it is possible wordwrap in the email may have caused
problems. I didn't post any code that has :

& """".Item


nor did I have a line like

="="" &_ Format

that line was broken on two separate lines (for a reason).

it looks like the code has somehow been mangled in transmission.

here it is again:


Private Sub Workbook_BeforeSave( _
ByVal SaveAsUI As Boolean, Cancel As _
Boolean)
With ThisWorkbook.Names
.Item("LastChange").RefersTo = "=""" & _
Format(Now(), "dd mmm yyyy") & """"
.Item("LastUser").RefersTo = Environ("username")
End With
End Sub

It works fine as written, so I don't know what to tell you.

If it still looks mangled, then I can send you a sample workbook directly.

--
Regards,
Tom Ogilvy