Ask Experts Questions for FREE Help !
Ask
    adalton's Avatar
    adalton Posts: 22, Reputation: 1
    New Member
     
    #1

    Jun 10, 2009, 06:54 PM
    Excel Macro Freeze Panes
    When I record a macro to freeze panes it gives me this code:

    Rows("1:4").Select
    ActiveWindow.FreezePanes = True

    But when I put it into my macro it freezes a bunch of rows and even some columns. Is there another way to do this? It is selecting the rows its just not freezing the right ones.
    JBeaucaire's Avatar
    JBeaucaire Posts: 5,426, Reputation: 997
    Software Expert
     
    #2

    Jun 10, 2009, 07:25 PM

    What ONE cell do want to freeze by?

    If you select a cell in column A, it freezes all rows above but the whole sheet scrolls down in rows.

    If you select a cell in Row 1, it freezes columns to the left of the choice and scrolls the sheet across in columns.

    If you select anything else, it will freeze above and to the left of the cell chosen.

    So, what one cell are you going to select?

    Based on your example above, it appears to me you want to freeze the first 4 rows onscreen. If so, use this:
    Code:
    Rows("A5").Select
    ActiveWindow.FreezePanes = True

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Excel Macro Value Comparison [ 2 Answers ]

I am creating a function in my macro to check to see if the value of a cell's 2nd digit is equivalent to some number. Say check if it is a 2 so 1234, 4244, 5255, x2xx all would work, then if so I want to insert a column there. Is this possible?

Excel Macro [ 13 Answers ]

I have some code that loops through a row and a column and compares data. When it finds the values being equal it copies the columns the row is in and pastes it on another sheet along with the previous value of the column. For Each CCell In Range("C2:C65418") If Not IsEmpty(CCell.Value)...

Excel macro [ 4 Answers ]

I need to run a macro that opens excel so I can kick off "application.ontime" basically my macro should run without me having to start excel, just have the computer and outlook running. Is that possible?

Painting time for windows with 8 panes over 8 panes (total 16) [ 2 Answers ]

I am doing an estimate for work in a home. I am going to paint a bunch of 8 pane over 8 pane windows. They are in pretty good shape, not much prep work , no putty is needed, a tiny bit of scraping and oil base priming to raw wood wood . I am doing both interior of the windows and exterior of the...

MS Excel freeze or unfreeze panes problem [ 1 Answers ]

I have used the freeze panes in MS Excel spreadsheet and it usually works whereas the LEFT of the FREEZE PANE is fixed, and the RIGHT of the FREEZE PANE moves/float. I access this by WINDOW | FREEZE or WINDOW | UNFREEZE. Sometimes on certain spreadsheets, I want to change the position of...


View more questions Search