Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() -- Brevity is the soul of wit. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Application.ScreenUpdating = False
is what you are looking for ? "Dave F" wrote: -- Brevity is the soul of wit. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry, let me be a little more specific. I recorded a macro, which I
intended to do the following three things: 1) Hide rows 86:120 2) Hide columns AM:CP 3) Freeze the windo at cell J4 This resulted in the following code: Sub ShowTCAPSfcst() ' ' ShowTCAPSfcst Macro ' Macro recorded 11/17/2006 by df78700 ' ' Hides rows 85:120, hides columns AM:CP, and freezes window at J4 Rows("85:120").Select Selection.EntireRow.Hidden = True Columns("AM:CP").Select Selection.EntireColumn.Hidden = True Range("J4").Select ActiveWindow.FreezePanes = True End Sub I attached this code to a button and started to test it. I noticed that the frozen cell wouldn't stay at J4. So, is there better code to use, than that provided by Excel's default macro recorder? Thanks, Dave -- Brevity is the soul of wit. "pgchop" wrote: Application.ScreenUpdating = False is what you are looking for ? "Dave F" wrote: -- Brevity is the soul of wit. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ok.
maybe the first question sould be why do you want to hide these columns. Because you can easily make your calculations on an other sheet and hide the entire sheet, even with a passord and even "veryhide" the sheet so that the sheet can not be "unhidden" manually but only using vba... Sub VeryHideSheet() Sheets("secret").Visible = xlSheetVeryHidden End Sub Sub ShowSheet() Sheets("secret").Visible = xlSheetVisible End Sub "Dave F" wrote: Sorry, let me be a little more specific. I recorded a macro, which I intended to do the following three things: 1) Hide rows 86:120 2) Hide columns AM:CP 3) Freeze the windo at cell J4 This resulted in the following code: Sub ShowTCAPSfcst() ' ' ShowTCAPSfcst Macro ' Macro recorded 11/17/2006 by df78700 ' ' Hides rows 85:120, hides columns AM:CP, and freezes window at J4 Rows("85:120").Select Selection.EntireRow.Hidden = True Columns("AM:CP").Select Selection.EntireColumn.Hidden = True Range("J4").Select ActiveWindow.FreezePanes = True End Sub I attached this code to a button and started to test it. I noticed that the frozen cell wouldn't stay at J4. So, is there better code to use, than that provided by Excel's default macro recorder? Thanks, Dave -- Brevity is the soul of wit. "pgchop" wrote: Application.ScreenUpdating = False is what you are looking for ? "Dave F" wrote: -- Brevity is the soul of wit. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
These rows/columns need to be hidden because this workbook is being sent to a
novice user of Excel who is apparently confused by extraneous data. Hiding the sheet is irrelevant here. Only a portion of it needs to be hidden. Dave -- Brevity is the soul of wit. "pgchop" wrote: ok. maybe the first question sould be why do you want to hide these columns. Because you can easily make your calculations on an other sheet and hide the entire sheet, even with a passord and even "veryhide" the sheet so that the sheet can not be "unhidden" manually but only using vba... Sub VeryHideSheet() Sheets("secret").Visible = xlSheetVeryHidden End Sub Sub ShowSheet() Sheets("secret").Visible = xlSheetVisible End Sub "Dave F" wrote: Sorry, let me be a little more specific. I recorded a macro, which I intended to do the following three things: 1) Hide rows 86:120 2) Hide columns AM:CP 3) Freeze the windo at cell J4 This resulted in the following code: Sub ShowTCAPSfcst() ' ' ShowTCAPSfcst Macro ' Macro recorded 11/17/2006 by df78700 ' ' Hides rows 85:120, hides columns AM:CP, and freezes window at J4 Rows("85:120").Select Selection.EntireRow.Hidden = True Columns("AM:CP").Select Selection.EntireColumn.Hidden = True Range("J4").Select ActiveWindow.FreezePanes = True End Sub I attached this code to a button and started to test it. I noticed that the frozen cell wouldn't stay at J4. So, is there better code to use, than that provided by Excel's default macro recorder? Thanks, Dave -- Brevity is the soul of wit. "pgchop" wrote: Application.ScreenUpdating = False is what you are looking for ? "Dave F" wrote: -- Brevity is the soul of wit. |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One issue you might be running up against is that freeze panes must be
removed before they can be reapplied at a new location... Try this... Sub ShowTCAPSfcst() ' ' ShowTCAPSfcst Macro ' Macro recorded 11/17/2006 by df78700 ' ' Hides rows 85:120, hides columns AM:CP, and freezes window at J4 Rows("85:120.EntireRow.Hidden = True Columns("AM:CP").EntireColumn.Hidden = True Range("J4").Select ActiveWindow.FreezePanes = False ActiveWindow.FreezePanes = True End Sub -- HTH... Jim Thomlinson "Dave F" wrote: -- Brevity is the soul of wit. |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Great, thanks.
-- Brevity is the soul of wit. "Jim Thomlinson" wrote: One issue you might be running up against is that freeze panes must be removed before they can be reapplied at a new location... Try this... Sub ShowTCAPSfcst() ' ' ShowTCAPSfcst Macro ' Macro recorded 11/17/2006 by df78700 ' ' Hides rows 85:120, hides columns AM:CP, and freezes window at J4 Rows("85:120.EntireRow.Hidden = True Columns("AM:CP").EntireColumn.Hidden = True Range("J4").Select ActiveWindow.FreezePanes = False ActiveWindow.FreezePanes = True End Sub -- HTH... Jim Thomlinson "Dave F" wrote: -- Brevity is the soul of wit. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Window Tool Bar - Freeze pane does not appear | Excel Discussion (Misc queries) | |||
How to make API call to freeze excel window? | Excel Programming | |||
Excel: find Window in which I can freeze panes | New Users to Excel | |||
Excel should allow me to freeze pane in a split window | Excel Worksheet Functions | |||
Advanced Window Split & Freeze Question | Excel Worksheet Functions |