ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Trying to freeze heading rows on a sheet (https://www.excelbanter.com/excel-programming/421211-trying-freeze-heading-rows-sheet.html)

JonWestcot

Trying to freeze heading rows on a sheet
 
Hi all:

I'm trying to programatically freeze the heading rows on a particular
worksheet via a VBA program. All columns across the sheet should be frozen
so that, as I scroll up and down, the headings remain in place.

I know this involves a Pane object, but I can't seem to create one
programatically.

Can someone suggest a way to implement this where the row is variable yet it
encompases all the columns?

Thanks for any assistance you can send my way!

Jon


Joshua Fandango

Trying to freeze heading rows on a sheet
 
Hi Jon,

I had trouble doing it without selecting a cell:

Sub Freeze_Columns()
Dim rVariableRange As Object
ActiveWindow.FreezePanes = False
Set rVariableRange = Range("a4")
rVariableRange.Select
ActiveWindow.FreezePanes = True
End Sub

Hope it helps,
JF

On 12 Dec, 09:40, JonWestcot
wrote:
Hi all:

I'm trying to programatically freeze the heading rows on a particular
worksheet via a VBA program. *All columns across the sheet should be frozen
so that, as I scroll up and down, the headings remain in place.

I know this involves a Pane object, but I can't seem to create one
programatically.

Can someone suggest a way to implement this where the row is variable yet it
encompases all the columns?

Thanks for any assistance you can send my way!

Jon



Stefi

Trying to freeze heading rows on a sheet
 
Try something like this:

NoofRowstoFroze = 1
Range("A" & NoofRowstoFroze + 1).Select
ActiveWindow.FreezePanes = True

Regards,
Stefi


€žJonWestcot€ť ezt Ă*rta:

Hi all:

I'm trying to programatically freeze the heading rows on a particular
worksheet via a VBA program. All columns across the sheet should be frozen
so that, as I scroll up and down, the headings remain in place.

I know this involves a Pane object, but I can't seem to create one
programatically.

Can someone suggest a way to implement this where the row is variable yet it
encompases all the columns?

Thanks for any assistance you can send my way!

Jon


JonWestcot[_2_]

Trying to freeze heading rows on a sheet
 
Thanks, Stefi, for the reply. Much appreciated!

Jon


"Stefi" wrote in message
...
Try something like this:

NoofRowstoFroze = 1
Range("A" & NoofRowstoFroze + 1).Select
ActiveWindow.FreezePanes = True

Regards,
Stefi


"JonWestcot" ezt írta:

Hi all:

I'm trying to programatically freeze the heading rows on a particular
worksheet via a VBA program. All columns across the sheet should be

frozen
so that, as I scroll up and down, the headings remain in place.

I know this involves a Pane object, but I can't seem to create one
programatically.

Can someone suggest a way to implement this where the row is variable

yet it
encompases all the columns?

Thanks for any assistance you can send my way!

Jon




JonWestcot[_2_]

Trying to freeze heading rows on a sheet
 
Hi Joshua:

Thanks for the reply. Much appreciated!

Jon


"Joshua Fandango" wrote in message
...
Hi Jon,

I had trouble doing it without selecting a cell:

Sub Freeze_Columns()
Dim rVariableRange As Object
ActiveWindow.FreezePanes = False
Set rVariableRange = Range("a4")
rVariableRange.Select
ActiveWindow.FreezePanes = True
End Sub

Hope it helps,
JF

On 12 Dec, 09:40, JonWestcot
wrote:
Hi all:

I'm trying to programatically freeze the heading rows on a particular
worksheet via a VBA program. All columns across the sheet should be frozen
so that, as I scroll up and down, the headings remain in place.

I know this involves a Pane object, but I can't seem to create one
programatically.

Can someone suggest a way to implement this where the row is variable yet

it
encompases all the columns?

Thanks for any assistance you can send my way!

Jon




Stefi

Trying to freeze heading rows on a sheet
 
You are welcome! Thanks for the feedback!
Stefi

€žJonWestcot€ť ezt Ă*rta:

Thanks, Stefi, for the reply. Much appreciated!

Jon


"Stefi" wrote in message
...
Try something like this:

NoofRowstoFroze = 1
Range("A" & NoofRowstoFroze + 1).Select
ActiveWindow.FreezePanes = True

Regards,
Stefi


"JonWestcot" ezt Ă*rta:

Hi all:

I'm trying to programatically freeze the heading rows on a particular
worksheet via a VBA program. All columns across the sheet should be

frozen
so that, as I scroll up and down, the headings remain in place.

I know this involves a Pane object, but I can't seem to create one
programatically.

Can someone suggest a way to implement this where the row is variable

yet it
encompases all the columns?

Thanks for any assistance you can send my way!

Jon






All times are GMT +1. The time now is 05:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com