And to remove the last 4 characters of the .name:
Private Sub Workbook_BeforePrint(Cancel As Boolean)
dim myName as string
myName = me.name
worksheets("Somesheetnamehere").PageSetup.CenterHeader _
= right(myname,len(myname)-4)
End Sub
I used the Me keyword--it refers to the object that owns the code. In this
case, it's the workbook that's being printed.
And I only changed a specific worksheet--not the activesheet.