Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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 !
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
before_print does not work - f8 key does not do anything Nasim Excel Programming 2 December 4th 06 02:03 AM
Before_Print JMay Excel Programming 10 November 12th 06 06:27 PM
Re-Post: Before_Print Sub Doesn't Trigger Phil Hageman[_3_] Excel Programming 27 March 4th 04 04:03 AM


All times are GMT +1. The time now is 08:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"