Freeze Panes Via VBA Selects Wrong Freeze Point
Jun 1, 2012
I have a macro which I recorded, then modified. The first thing it does is to freeze the top row, then it goes looking for a particular row and inserts some formulae. Nothing complicated at all.
It WAS working perfectly, but I wanted some improvements in the insertion of the formulae. I got that working just fine, but now the panes freeze in the wrong place. No matter what I do, it freezes at cell I16. I want only the top row frozen.
Found this code which was reported to work:
PHP Code:
ActiveWindow.FreezePanes = False Range("A1").Select ActiveWindow.FreezePanes = True
It still freezes at I16. I have tried shutting down Excel, and even my computer, in case it is some weird bug where something is stuck in memory.
I tried recording another macro to format some cells and also freeze the top row. Same result.
PHP Code:
Sub wraptext_top_row()'' wraptext_top_row Macro''
Rows("1:1").Select With Selection
.HorizontalAlignment = xlCenter
[Code] ..........
Same result. I tried copying the contents of the worksheet to Notepad, then into a fresh workbook, just in case there's some weird hangup in formatting that I can't see.
There is NOTHING in the original code that references that cell, or even that row or column. NOTHING. How it got hung up on that one cell I cannot fathom.
The Freeze Panes command works normally if I apply it manually. Any cell, anywhere, it works as expected.
View 1 Replies
ADVERTISEMENT
Jan 15, 2009
I tried highlighting the top 2 rows and clicking 'freeze panes' but it didn't seem to freeze correctly
View 3 Replies
View Related
Nov 20, 2009
Just wondering if I can lock a worksheet to display the content within the window only. Eg 22 Rows by 6 Columns? Therefore stopping people tampering or moving objects?
View 10 Replies
View Related
Nov 3, 2009
I'm trying to get one of my macros to freeze panes in several worksheets. For some reason though, sometimes it freezes the panes in the wrong place. What could be causing this? My code basically looks like this:
View 4 Replies
View Related
Jan 28, 2013
Is there a way to freeze specific panes? I know that you can use freeze panes to freeze cells to the left and above a specified cell but I am trying to freeze specific cells. For instance I want to freeze cells A1 through K25 so that when I scroll up everything else scrolls up and when I scroll right everything else scrolls right?
View 2 Replies
View Related
Oct 12, 2007
Anyone know if it is possible, in VBA, to freeze the panes of a worksheet at a specific cell without selecting that worksheet or the cell.
View 9 Replies
View Related
Dec 18, 2007
I'm looking for a solution to freeze panes twice. That is I want to freeze row 1-15 and row 200-203. And then the rows 16-199 to be movable. In the first 15 rows I have column info so I need that visable all the time and in row 200-203 I have " Sum" of the lines 16-199 so that's why I want that to also be visible at all time. The ordinary freeze pane in excel just freezes at one certain horizontol point and I need 2. Can it be done with VBA maybe? Is it possible to insert an up/down arrow (the one you have at the right side of the screen, don't now what it's called) for the lines 16-199?
View 3 Replies
View Related
Jul 18, 2014
I want to change looks of my workbook with freezing columns on left side, and columns on right side. Between are days of months, where I want to use scrollbar.
I know I can freeze only on one side, but don't know how this Split option really works.
See this screenshot, that's how I want It to look (brown colour for columns that need to be frozen)
Untitled2.png
View 3 Replies
View Related
Dec 6, 2012
How to use freeze panes? I am trying to freeze specific cells and all I seem to be able to do is freeze the top half of the spreadsheet.
View 2 Replies
View Related
Sep 11, 2009
I have a sheet in which I am using freeze panes to keep the header section always visible. I would like to be able to add a toggle button with a macro to the sheet to allow the user to turn the existing freeze panes on/off at will, without the need to navigate the menu bar itself. So far I have not been able to find any info on if/how this may be possible. If anyone has any experience controlling freeze panes via macros, etc.
View 3 Replies
View Related
Oct 27, 2009
Freeze Panes Code not working.
Below is the code im not sure whats up with it?
View 3 Replies
View Related
Nov 5, 2009
If is possible to create any info about freezing panes. I mean, when is pan freezed, and rows are scrolled in lower part of table (upper data are not vissible) if is possible display/show any text about this (e.g. "The first line of table are not visible")...but only if is not the upper part of data visible..not always.
View 5 Replies
View Related
Oct 30, 2013
I know you can't delete columns permanently in a worksheet so I am hiding them. Attached is an image of how many I want. My issue is that the dividing line that is used to freeze a top row pane is still extending across the entire worksheet (which has whitespace on the right side).
I suppose I could always extend my formatted worksheet to be the size of the screen.
View 1 Replies
View Related
Oct 5, 2007
Is there a way I can disable Window > Freeze Panes and Data > Sort from a shared workbook?
View 9 Replies
View Related
Jun 13, 2007
I would like to freeze the bottom part of my spreadsheet, such that the user can scroll through the upper part but still be able to see the bottom part. The freeze command freezes what is above the line, I want to freeze what is below the line.
View 4 Replies
View Related
Dec 13, 2013
How to enable freeze panes, I am running excel 2003, I have no hidden workbook and I have followed the video that explains how to freeze panes, but it remains greyed out and I just cannot enable it..
View 1 Replies
View Related
May 27, 2010
I am trying to include code into the end of my macro that will look in all worksheets and freeze pane row $1:$1
View 9 Replies
View Related
Dec 3, 2007
I have a workbook where I have columns requiring entry from A to AD. I have set conditional formatting in column A to show a colour if there is an entry in column AD. I would like to use a macro to always freeze panes in column D (to show the data in the first 3 columns) and the macro would then show column AD in the other frozen pane/split.
As there will always be an entry in column A but not always in column AD I want to be able to select any highlighted row in column A , run the macro and the cursor will be showing in column AD on the same row ( relative reference?) thus showing the entry in AD next to the other info in columns A, B and C.
At the moment I have a macro that unfreezes my header row and is set to always choose the "next empty cell" but I don't know the code to change it to get what I want. Currently if I select any entry in column A e.g. row 100 and run the macro I find the cursor showing in AD2! Of course I would like to run another macro to return back to A on the same row too.....
View 9 Replies
View Related
Jan 16, 2008
I have an issue, and I need some help. I am using MS excel 2002.
I have frozen the line with the column headings. In some of the column headings there are comments. Because the panes are frozen when the user scrolls to a certain point the comments cant be seen. Is there any way to fix this? or get around this.
View 9 Replies
View Related
Mar 6, 2013
How to freeze/split panes so the colored boxes on the left stay fixed in place while the other boxes on the right scroll up and down? I'm figuring out the right combo of freeze and split panes.
View 1 Replies
View Related
Dec 17, 2007
I have multiple sheets as part of my excel calculations which refer to the first sheet in the group. Each one calculates different values for me based on the numbers I put into the sheet.
So to put in these numbers, I insert new rows to the start of the sheet which is what I always want it to calculate. Some of the calculations are comparative to other points from my original page. So I might ask it to go back and compare to 3 months ago or 6 months ago.
Long story short, when I insert those new rows, the formula on the other pages shift down to stay on the previous days data. How can I lock it in so it stays focused on just the cell I tell it to reguardless of how I move those cells around. So when i hit insert, I still want it focused on that sheets A1 and NOT A2.
I attempted to look up the help section but since I am having a hard time putting this into words, help was not much "help".
View 9 Replies
View Related
Nov 23, 2013
i want freeze only one cell. I have a button. I want keep that button permanently in a place. i am planning to freeze a cell where the button is located.
View 3 Replies
View Related
Jul 7, 2006
when ever it runs it brings up the print preview of the correct sheet (looks just like i wanted) but the vba object stays infront of the print preview window and locks up i cannot close it and cannot access the print preview window because it is blocked by the vba object even though i can see the print preview in the backbround.
i have tried asding "unload me" after the "activesheet.printpreview" line but does not make any differnce i end up having to close excel via task manager and reopen it.
Private Sub cmdPrtPreview_Click()
On Error Resume Next
Sheets("invoice").Select
ActiveSheet.PrintPreview
End Sub
View 5 Replies
View Related
Oct 2, 2013
A list box selection works fine on my computer but on a friends Windows Vista PC the following happens:
Selecting items near the top of the list works fine. 1/4 of way down a mouse click on an item selects the Next item.
1/2 of the way down in the list, the mouse click on an item selects the one 2 or 3 further down, etc., etc.
View 1 Replies
View Related
Oct 16, 2009
I am wanting to freeze the first column on my spreadsheet (easy) but also the top few rows. Every time I try (am using 2007) it seems to make a strange selection where it splits the screen exactly into 4 equal parts rather than just the first column and top 4 rows.
View 3 Replies
View Related
Feb 8, 2006
I have a long sample list, (names and telephone no.), once a name and number
are used an outcome code is entered in the end cell like so ...
View 10 Replies
View Related
Sep 6, 2009
Is there a way to freeze both rows and columns? I want to freeze the first five rows 1-5 and columns A-C and have the ability to scroll while having thee rows/columns static?
View 7 Replies
View Related
Apr 12, 2012
I would like to freeze multiple rows, that are NOT together in the spreadsheet. For example. Rows 1-3 are always frozen, but the 4 row that is frozen will vary on where the user is in the spreadsheet. The last row (4th row) in the freeze pane is variable. If I am between rows 1-100 I want rows 1,2,3, and 5 frozen, if I am between rows 100-200, i want rows 1,2,3,101 frozen.
I have multiple tables with different headings in one spreadsheet. My heading for table from row 6-99 is in row 5, and my heading for table 102-200 is in 101.
View 2 Replies
View Related
Mar 16, 2013
I am trying to find any way possible to freeze left side 3 columns and 3 right side visible columns on the screen. and the rest columns in between these freeze columns scrollable on left or right arrow keys as normal.
View 4 Replies
View Related
Aug 6, 2013
This code does not work the way I expect it to. Presently it just causes Excel to freeze.
The idea is that if you double-click a cell within the CurrentRegion (starting at A1) that AutoFilters will be applied and the selection criteria will be the target value:
Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim MyRng As Range
Dim MyCol As Long
Set MyRng = ActiveSheet.Range("A1").CurrentRegion
MyCol = Target.Column
If Not Application.Intersect(Target, MyRng) Is Nothing Then
ActiveSheet.AutoFilterMode = False
MyRng.AutoFilter Field:=MyCol, Criteria1:=Target.Value, Operator:=xlFilterValues
Cancel = True
End If
End Sub
View 3 Replies
View Related