Salve a tutti.
Questa macro stampa il foglio con l'intestazione piè pagina creata con una macro:
'---------------------------------------------------------------
With ActiveSheet.PageSetup
.LeftFooter = "data: " & Format(Date, "dddd dd/mm/yyyy")
.RightFooter = "firma: " & Application.UserName
End With
'---------------------------------------------------------------
Option Explicit
Sub stampa()
Dim avviso As String
ActiveSheet.Unprotect "987654"
avviso = MsgBox("Sign. " & Environ("UserName") & "" _
& Chr(13) & "stampo il foglio?", _
vbQuestion + vbYesNo + vbDefaultButton2, "STAMPA")
If avviso = 7 Then
ActiveSheet.Protect "987654"
Exit Sub
End If
'---------------------------------------------------------------
With ActiveSheet.PageSetup
.LeftFooter = "data: " & Format(Date, "dddd dd/mm/yyyy")
.RightFooter = "firma: " & Application.UserName
End With
'---------------------------------------------------------------
ActiveWindow.SelectedSheets.PrintPreview
ActiveSheet.Protect "987654"
End Sub
la grandezza del testo non riesco a "ingrandila".
Un aiuto?
Grazie.
john