![]() |
Before_Print
Greetings !
Would anyone have some idea why this don't work - please ? Private Sub App_WorkbookBeforePrint(ByVal Wb As Workbook, Cancel As Boolean) For Each wk In Wb.Worksheets wk.Calculate If wk.Name = "DATA - ALL" Then Range("F12").ColumnWidth = 100 End If Next End Sub |
Before_Print
Try this
Private Sub Workbook_BeforePrint(Cancel As Boolean) Application.Calculation = xlCalculationAutomatic Dim wks As Worksheet For Each wks In ActiveWorkbook.Worksheets If wks.Name = "DATA - ALL" Then Range("F12").ColumnWidth = 100 End If Next wks End Sub "Robin Clay" wrote: Greetings ! Would anyone have some idea why this don't work - please ? Private Sub App_WorkbookBeforePrint(ByVal Wb As Workbook, Cancel As Boolean) For Each wk In Wb.Worksheets wk.Calculate If wk.Name = "DATA - ALL" Then Range("F12").ColumnWidth = 100 End If Next End Sub |
Before_Print
"Mike" wrote:
Try this Thank you for your response - but it wasn't the "calculate" that was the problem, it was the "column width". My fault, sorry ! |
All times are GMT +1. The time now is 09:03 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com