ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Align Worksheet & Freeze Panes (https://www.excelbanter.com/excel-discussion-misc-queries/141639-align-worksheet-freeze-panes.html)

Adams SC[_2_]

Align Worksheet & Freeze Panes
 
I have a subset of worksheet in a workbook that I would like to

Aligned so that the first column on left is D
Align so that the first row at top is 8
goto cell D14 and Freeze panes

I tried recording a macro but didn't work


Dom_Ciccone

Align Worksheet & Freeze Panes
 

Write the following code for your macro:

Sub freezealign()
With ActiveWindow
.ScrollColumn = 3
.ScrollRow = 8
.ActiveSheet.Range("D14").Select
.FreezePanes = True
End With
End Sub

It doesn't do exactly what you want, it aligns to column C instead of column
D. If I aligned to column 4 and then chose freezepanes at column 4 it
doesn't freeze. I have no answer to that part.

"Adams SC" wrote:

I have a subset of worksheet in a workbook that I would like to

Aligned so that the first column on left is D
Align so that the first row at top is 8
goto cell D14 and Freeze panes

I tried recording a macro but didn't work



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

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