PC Review


Reply
Thread Tools Rate Thread

how do I freeze windows with VBA?

 
 
=?Utf-8?B?RGF2ZSBG?=
Guest
Posts: n/a
 
      17th Nov 2006
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?
--
Brevity is the soul of wit.
 
Reply With Quote
 
 
 
 
Dennis
Guest
Posts: n/a
 
      17th Nov 2006
Dave

Range("CellOfYourChoice").Select
ActiveWindow.FreezePanes = True

HTH

Dave F wrote:
> 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?
> --
> Brevity is the soul of wit.


 
Reply With Quote
 
=?Utf-8?B?RGF2ZSBG?=
Guest
Posts: n/a
 
      17th Nov 2006
Ignore this, I double posted by accident.
--
Brevity is the soul of wit.


"Dave F" wrote:

> 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?
> --
> Brevity is the soul of wit.

 
Reply With Quote
 
Gary Keramidas
Guest
Posts: n/a
 
      17th Nov 2006
this has worked for me
Rows("23:23").Select
ActiveWindow.FreezePanes = True

--


Gary


"Dave F" <(E-Mail Removed)> wrote in message
news:5B94AF16-4287-46EC-A942-(E-Mail Removed)...
>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?
> --
> Brevity is the soul of wit.



 
Reply With Quote
 
Dennis
Guest
Posts: n/a
 
      17th Nov 2006
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

Dave F wrote:
> 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?
> --
> Brevity is the soul of wit.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
All IE windows freeze =?Utf-8?B?SUUgNg==?= Windows XP Internet Explorer 2 19th Aug 2006 10:19 PM
after 30 min of use windows freeze up =?Utf-8?B?Q29uZnVzZWQ=?= Windows XP Accessibility 4 10th Jan 2005 08:07 PM
windows XP freeze George Windows XP General 0 12th Aug 2004 07:04 PM
Windows XP FREEZE: HELP! Pete Windows XP Help 0 27th Nov 2003 05:23 PM
Windows XP Freeze R D Windows XP Performance 1 21st Jul 2003 05:33 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:04 PM.