SteveGregory
Structural
- Jul 18, 2006
- 554
I am very new to VBA stuff. I have two functions that I am trying to write. I would like them to work for Excel 2007, 2010 and finally 2000 if possible.
1. I would like to open a worksheet and have a function returns the name of the user/machine who last saved the file. My attempt:
Function LastAuthor()
LastAuthor = ThisWorkbook.BuiltinDocumentProperties("Last Author")
End Function
Cell formula: =LastAuthor()
2. I would like to open a worksheet and have a function returns the name of the current user/machine. My attempt:
Function CurrentUser()
CurrentUser = ActiveWorkbook.UserStatus
End Function
Cell formula: =CurrentUser()
Thanks, Steve
1. I would like to open a worksheet and have a function returns the name of the user/machine who last saved the file. My attempt:
Function LastAuthor()
LastAuthor = ThisWorkbook.BuiltinDocumentProperties("Last Author")
End Function
Cell formula: =LastAuthor()
2. I would like to open a worksheet and have a function returns the name of the current user/machine. My attempt:
Function CurrentUser()
CurrentUser = ActiveWorkbook.UserStatus
End Function
Cell formula: =CurrentUser()
Thanks, Steve