ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   BeforePrint (https://www.excelbanter.com/excel-programming/383109-beforeprint.html)

Robin Clay

BeforePrint
 
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
If wk.Name = "DATA - ALL" Then
Range("F12").ColumnWidth = 100
End If
Next
End Sub


Bob Phillips

BeforePrint
 
Works for me. Did you setup application events correctly?

--
HTH

Bob Phillips

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Robin Clay" wrote in message
...
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
If wk.Name = "DATA - ALL" Then
Range("F12").ColumnWidth = 100
End If
Next
End Sub




Robin Clay

BeforePrint
 
"Bob Phillips" wrote:

....for which, muchos gracias.

Works for me. Did you setup application events correctly?


Huh ?

Robin Clay

BeforePrint
 
"Bob Phillips" wrote:

From your response, you don't need them so use


Thank you !

Robin Clay

BeforePrint
 
"Tom Ogilvy" wrote:

Use the Workbook level BeforePrint


Thank you !


All times are GMT +1. The time now is 11:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com