Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default VBA Code to automatically reset the Freeze Panes settings

Maybe this will get you started:

Sub ABCDD()
Dim rng As Range
Set rng = ActiveSheet.PivotTables(1).DataBodyRange
rng(1).Select
ActiveWindow.FreezePanes = False
ActiveWindow.FreezePanes = True

End Sub


--
regards,
Tom Ogilvy

"SaeOngJeeMa" wrote in message
...
Hello, I have a spreadsheet with a bunch of controls on a Pivot Table
Worksheet that use VBA code to control the Pivot Table layout. Every time
the
user clicks a control it changes the configuration of Pagefields,
Rowfields,
Datafields and Columnfields. I'd like to have a (hopefully simple) VBA Sub
that changes the Freeze Panes settings relative to the newest position of
the
upper leftmost Datafield.

The one thing I'm missing is a way to easily find that upper leftmost
Datafield cell position using VBA code. Does anyone know a simple way of
locating that cell? Thanks in advance.
Best Regards, Dean



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default VBA Code to automatically reset the Freeze Panes settings

Hey Tom,
Worked great! Thanks.
--
Best Regards,
Dean


"Tom Ogilvy" wrote:

Maybe this will get you started:

Sub ABCDD()
Dim rng As Range
Set rng = ActiveSheet.PivotTables(1).DataBodyRange
rng(1).Select
ActiveWindow.FreezePanes = False
ActiveWindow.FreezePanes = True

End Sub


--
regards,
Tom Ogilvy

"SaeOngJeeMa" wrote in message
...
Hello, I have a spreadsheet with a bunch of controls on a Pivot Table
Worksheet that use VBA code to control the Pivot Table layout. Every time
the
user clicks a control it changes the configuration of Pagefields,
Rowfields,
Datafields and Columnfields. I'd like to have a (hopefully simple) VBA Sub
that changes the Freeze Panes settings relative to the newest position of
the
upper leftmost Datafield.

The one thing I'm missing is a way to easily find that upper leftmost
Datafield cell position using VBA code. Does anyone know a simple way of
locating that cell? Thanks in advance.
Best Regards, Dean




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
Excel 2003 freeze panes won't freeze top row only macbone2002 Excel Discussion (Misc queries) 3 April 22nd 23 02:07 AM
Freeze panes automatically freezes at r14 when I highlight r1? Christene Excel Discussion (Misc queries) 3 June 18th 08 05:44 PM
Freeze panes John Pryor Excel Discussion (Misc queries) 1 June 26th 06 03:55 PM
freeze panes? gregp22 Excel Discussion (Misc queries) 1 April 2nd 06 05:15 AM
freeze panes? gregp22 New Users to Excel 3 April 2nd 06 02:37 AM


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

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"