Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Locking panes
I have a macro that does alot of things in a spreadsheet. I want the code to
lock the panes at a certain column. The coulmn is not the same every time so I cannot simply record a macro but if a record a macro the code is: Columns("F:F").Select ActiveWindow.FreezePanes = True Now I need to replace the first line with something else. I want to lock the panes where at the column where the word "Securitiy ID" is found. There (with some help) I wrote: Set rng2 = Worksheets("Beräkning").Cells.Find("Security ID", LookIn:=xlValues) ...... Columns(rng2.Address).Select ActiveWindow.FreezePanes = True but this does not work. Please help me if you have any clue. Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Locking panes
Cells.Find(What:="Security ID", After:=ActiveCell,
LookIn:=xlFormulas, LookAt:= _ xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _ , SearchFormat:=False).Activate Columns(ActiveCell.Column).Select ActiveWindow.FreezePanes = True *If that doesn't wory, check your spelling of Security, not sure if you copied and pasted it but there was a spelling mistake! Cheers |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Freeze panes | Excel Worksheet Functions | |||
row locking, instead of file locking? | Excel Discussion (Misc queries) | |||
More Dividers for Excel Viewing Panes / multiple panes per axis. | Excel Discussion (Misc queries) | |||
locking formula in cells in without locking whole sheet | Excel Discussion (Misc queries) | |||
Panes sequence. Pane Index 2 & 3 depend on how panes are created | Excel Programming |