Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why Excel slow to evaluate after print or print preview 2

Status
Not open for further replies.

SanAntonioSpurFan

Instructor
Oct 21, 2003
83
US
I have this simple procedure that is performed each time a option button is selected. It runs fast "no wait time" when a user selects different options buttons. Once the user clicks File/Print or Print Preview in Excel, the procedure boggs downs. It takes like 15 seconds to run everytime a option button is clicked. Does anyone have any suggestions to improve performance after print or print preview? If you close the file and re-open, the procedure is fast again.

Sub RowHeightBS()
For I = 8 To 207
If (Cells(I, 3) = 0) Then
Rows(I).RowHeight = 0
Else
Rows(I).RowHeight = 15
End If
Next I
End Sub
 
Have you tried this ?
Code:
Sub RowHeightBS()
Range("C7:C207").Selection.AutoFilter _
  Field:=1, Criteria1:="<>0", VisibleDropDown:=False
End Sub

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Do you ever find out why it was working slowly after the Print Preview? Or did you just use PHV's faster way and forget the Print Preview issues?
 
IMHO, after the Print Preview all the page breaks properties and collections are reevaluated at each row heigth change.
 
PHV,
Sounds like a good enough hypothesis to me! Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top