Ciao a tutti. Ho bisogno del vostro aiuto , dato che le mie routine VBA sono peggio delle cimici dentro i primi computer a valvole ;(
Vorrei impostare l'area di stampa in tutti i fogli di lavoro di una cartella Excel (Excel 2007).
Ho scritto questo:
Option Explicit
Dim ws As Worksheet
Sub SetAttributes()
For Each ws In ActiveWorkbook.Worksheets
Worksheets("Abano").PageSetup.PrintArea = "$A$1:$L$51"
Next ws
End Sub
' The workbook containing the following macro also includes a
' worksheet called Sheet1, which is the source of the PageSetup
' information that you want to use to format the worksheets in
' another workbook.
' Before you run this macro, make sure that the second workbook
' is active.
Sub SetWorkbookAttributes()
For Each ws In ActiveWorkbook.Worksheets
ws.PageSetup.PrintArea = _
ThisWorkbook.Worksheets("Abano").PageSetup.PrintArea
Next ws
End Sub
purtroppo però la routine mi dà errore.
In pratica imposto nel primo foglio un'area di stampa e poi a partire dal secondo foglio lui dovrebbe impostare l'area di stampa come per quella del foglio "Abano". Ottengo però un errore.
Qualcuno mi saprebbe aiutare ?
Grazie come sempre per il vostro aiuto !!