how do I freeze windows with VBA?

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?
 
D

Dennis

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top