I get a name conflict “Print_Area”. What can I do?

 

There is a known bug with some Excel versions and workbooks saved with different locales of Excel.

A workaround is available: first, be sure to remove the Print_Area name in the Defined Names of Excel before saving.

Then, add this VBA code snippet to your workbook:

 

Private Sub Workbook_Open()

Dim Sh As Worksheet

For Each Sh In ThisWorkbook.Worksheets

     With Sh

         .PageSetup.PrintArea = ""

         .PageSetup.PrintTitleRows = ""

     End With

Next

End Sub

 

And the same for:

 

Private Sub Workbook_Beforeclose()

Dim Sh As Worksheet

For Each Sh In ThisWorkbook.Worksheets

     With Sh

         .PageSetup.PrintArea = ""

         .PageSetup.PrintTitleRows = ""

     End With

Next

End Sub

 


Copyright © 2021 G.D.G. Software