Signing Spreadsheets

V

Vercingetorix.XIII

There used to be a way to put your name in Windows so that when a user
clicked on Help and About your name and log was there, is there a way to that
in Excel?
 
R

ryguy7272

Here is one way:
Private Declare Function apiGetUserName Lib "advapi32.dll" Alias _
"GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long

Function fOSUserName() As String
' Returns the network login name
Dim lngLen As Long, lngX As Long
Dim strUserName As String
strUserName = String$(254, 0)
lngLen = 255
lngX = apiGetUserName(strUserName, lngLen)
If (lngX > 0) Then
fOSUserName = Left$(strUserName, lngLen - 1)
Else
fOSUserName = vbNullString
End If
End Function

Note: it may NOT work as you wish...try it and see...

Regards,
Ryan---
 
S

Stephen Bye

Vercingetorix.XIII said:
There used to be a way to put your name in Windows so that when a user
clicked on Help and About your name and log was there, is there a way to
that
in Excel?

File > Properties
 
G

Gord Dibben

You didn't like this reply to your posting of yesterday?

Private Sub Workbook_Open()
Sheets("Sheet1").Range("A1").Value _
= ActiveWorkbook.BuiltinDocumentProperties("Author")
End Sub


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top