Add author in footer

Copper Contributor

Hello,

How can I add in the footer of an excel file the name of the author who is modifying the file?

Is there any specific rule for this?

thanks for the help

 

 

1 Reply

@annieb You can use the following code:

 

Sub NameInFooter()
    
    ActiveSheet.PageSetup.CenterFooter = "Elaborado por: " & Environ("username")
        
End Sub

I would probably call it in the Before_Print event, but that's up to you.

 

HTH