Poniendo esto en un modulo normal:<pre>Private Declare Function GetUserName Lib "advapi32.dll" Alias _
"GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Function UserName()
Dim strUserName As String
strUserName = String(100, Chr$(0))
GetUserName strUserName, 100
strUserName = Left$(strUserName, InStr(strUserName, Chr$(0)) - 1)
UserName = strUserName
End Function</pre>Y esto en el módulo del Libro (ThisWorkbook), se podría hacer:<pre>Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
.LeftFooter = "Impreso por: " & UserName()
End With
End Sub</pre>
_________________
Regards,
Juan Pablo G.
MrExcel.com Consulting
This message was edited by Juan Pablo G. on 2002-10-10 15:36