Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code Consolidation (1)
Is there a way to consolidate these subs into one sub? This would be the first of six groups needing condensing
Thanks, Phi Sub GoToRationale11( Application.ScreenUpdating = Fals Sheets("Rationale 1.1").Selec Application.Goto Reference:=Range("A1"), Scroll:=Tru ActiveWindow.Zoom = 6 Application.ScreenUpdating = Tru End Su Sub GoToRationale12( Application.ScreenUpdating = Fals Sheets("Rationale 1.2").Selec Application.Goto Reference:=Range("A1"), Scroll:=Tru ActiveWindow.Zoom = 6 Application.ScreenUpdating = Tru End Su Sub GoToRationale13( Application.ScreenUpdating = Fals Sheets("Rationale 1.3").Selec Application.Goto Reference:=Range("A1"), Scroll:=Tru ActiveWindow.Zoom = 6 Application.ScreenUpdating = Tru End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code Consolidation (1)
Phil
One way: Sub GoToRationale() Dim Sh As Worksheet Application.ScreenUpdating = False For Each Sh In Sheets(Array("Rationale 1.1", "Rationale 1.2", "Rationale 1.3")) Sh.Activate Application.Goto Reference:=Range("A1"), Scroll:=True ActiveWindow.Zoom = 69 Next Sh Application.ScreenUpdating = True End Sub -- Best Regards Leo Heuser Followup to newsgroup only please. "Phil Hageman" skrev i en meddelelse ... Is there a way to consolidate these subs into one sub? This would be the first of six groups needing condensing. Thanks, Phil Sub GoToRationale11() Application.ScreenUpdating = False Sheets("Rationale 1.1").Select Application.Goto Reference:=Range("A1"), Scroll:=True ActiveWindow.Zoom = 69 Application.ScreenUpdating = True End Sub Sub GoToRationale12() Application.ScreenUpdating = False Sheets("Rationale 1.2").Select Application.Goto Reference:=Range("A1"), Scroll:=True ActiveWindow.Zoom = 69 Application.ScreenUpdating = True End Sub Sub GoToRationale13() Application.ScreenUpdating = False Sheets("Rationale 1.3").Select Application.Goto Reference:=Range("A1"), Scroll:=True ActiveWindow.Zoom = 69 Application.ScreenUpdating = True End Sub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code Consolidation (1)
One way:
Public Sub GoToRationale11to13() Dim rOldActiveCell As Range Dim wsSheet As Worksheet Set rOldActiveCell = ActiveCell With Application .ScreenUpdating = False For Each wsSheet In Sheets(Array("Rationale 1.1", _ "Rationale 1.2", "Rationale 1.3")) .Goto wsSheet.Range("A1"), Scroll:=True ActiveWindow.Zoom = 69 Next wsSheet .Goto rOldActiveCell .ScreenUpdating = True End With End Sub In article , Phil Hageman wrote: Is there a way to consolidate these subs into one sub? This would be the first of six groups needing condensing. Thanks, Phil Sub GoToRationale11() Application.ScreenUpdating = False Sheets("Rationale 1.1").Select Application.Goto Reference:=Range("A1"), Scroll:=True ActiveWindow.Zoom = 69 Application.ScreenUpdating = True End Sub Sub GoToRationale12() Application.ScreenUpdating = False Sheets("Rationale 1.2").Select Application.Goto Reference:=Range("A1"), Scroll:=True ActiveWindow.Zoom = 69 Application.ScreenUpdating = True End Sub Sub GoToRationale13() Application.ScreenUpdating = False Sheets("Rationale 1.3").Select Application.Goto Reference:=Range("A1"), Scroll:=True ActiveWindow.Zoom = 69 Application.ScreenUpdating = True End Sub |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code Consolidation (1)
Leo
Thanks for the help Phil |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code Consolidation (1)
You're welcome, Phil.
LeoH "Phil Hageman" skrev i en meddelelse ... Leo, Thanks for the help! Phil |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Consolidation | Excel Discussion (Misc queries) | |||
Consolidation | Excel Discussion (Misc queries) | |||
consolidation | Excel Discussion (Misc queries) | |||
Consolidation | Excel Discussion (Misc queries) | |||
Consolidation | Excel Worksheet Functions |