how do I freeze windows with VBA?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have the following code:

Sub ShowTCAPSfcst()
'
' ShowTCAPSfcst Macro
' Macro recorded 11/17/2006 by df78700
'

' Hides rows 85:120, hides columns AM:CP, and freezes window at J4
Rows("85:120").Select
Selection.EntireRow.Hidden = True
Columns("AM:CP").Select
Selection.EntireColumn.Hidden = True
Range("J4").Select
ActiveWindow.FreezePanes = True
End Sub

This seems to work some times, but not others:
Range("J4").Select
ActiveWindow.FreezePanes = True

Ideas?
 
Dave,

Other issues, make sure of your active window. Also, I have had issues

with Calculation = Manual and/or with

With Application.ScreenUpdating = False

I have eliminated my problems with

With Application.ScreenUpdating = True

EagleOne
 
Back
Top