Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi again guys,
I've got a Macro (rather long but basically copies and pastes contents from various sources into a single spreadsheet). However, If I hide the "formula" sheet it stops the Macro from working. How can I get the Macro to work while keeping the "formula" sheet hidden? Below is the macro: (I've cut out the irrelevant bits). Sub Remediation_Plan() ' ' Remediation_Plan Macro ' Macro recorded 26/06/2009 by Terry B Glover ' ' Sheets("Formula").Select Range("B4").Select Application.CutCopyMode = False Selection.Copy Sheets("Remediation Plan").Select Range("E5").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Sheets("Formula").Select Range("B5").Select Application.CutCopyMode = False Selection.Copy Sheets("Remediation Plan").Select Range("E7").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Sheets("Formula").Select Range("B6").Select Application.CutCopyMode = False Selection.Copy Sheets("Remediation Plan").Select Range("E9").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Sheets("Formula").Select Range("B7").Select Application.CutCopyMode = False Selection.Copy Sheets("Remediation Plan").Select Range("E11").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Sheets("Formula").Select Range("B8").Select Application.CutCopyMode = False Selection.Copy Sheets("Remediation Plan").Select Range("E13").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Sheets("Formula").Select Range("B9").Select Application.CutCopyMode = False Selection.Copy Sheets("Remediation Plan").Select Range("E15").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False ActiveWindow.SmallScroll Down:=12 Sheets("Formula").Select Range("B10").Select Application.CutCopyMode = False Selection.Copy Sheets("Remediation Plan").Select Range("E17").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Sheets("Formula").Select Range("B11").Select Application.CutCopyMode = False Selection.Copy Sheets("Remediation Plan").Select Range("E19").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Sheets("Formula").Select Range("B12").Select Application.CutCopyMode = False Selection.Copy Sheets("Remediation Plan").Select Range("E20").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Sheets("Formula").Select Range("B13").Select Application.CutCopyMode = False Selection.Copy Sheets("Remediation Plan").Select Range("E21").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Sheets("Formula").Select Range("B14").Select Application.CutCopyMode = False Selection.Copy Sheets("Remediation Plan").Select Range("E22").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Application.CutCopyMode = False Selection.ClearContents Range("E22").Select Sheets("Formula").Select Selection.Copy Sheets("Remediation Plan").Select Range("E23").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Sheets("Formula").Select Range("B15").Select Application.CutCopyMode = False Selection.Copy Sheets("Remediation Plan").Select Range("E24").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Sheets("Formula").Select Range("B16").Select Application.CutCopyMode = False Selection.Copy Sheets("Remediation Plan").Select Range("E25").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Sheets("Formula").Select Range("B17").Select Application.CutCopyMode = False Selection.Copy Sheets("Remediation Plan").Select Range("E27").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False ActiveWindow.SmallScroll Down:=12 Sheets("Formula").Select Range("B18").Select Application.CutCopyMode = False Selection.Copy Sheets("Remediation Plan").Select Range("E28").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Sheets("Formula").Select Range("B19").Select Application.CutCopyMode = False Selection.Copy Sheets("Remediation Plan").Select Range("E29").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Sheets("Formula").Select Range("B20").Select Application.CutCopyMode = False Selection.Copy Sheets("Remediation Plan").Select Range("E30").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Sheets("Formula").Select Range("B21").Select Application.CutCopyMode = False Selection.Copy Sheets("Remediation Plan").Select Range("E31").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Sheets("Formula").Select Range("B22").Select Application.CutCopyMode = False Selection.Copy Sheets("Remediation Plan").Select Range("E32").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Sheets("Formula").Select Range("B23").Select Application.CutCopyMode = False Selection.Copy Sheets("Remediation Plan").Select Range("E33").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False ActiveWindow.SmallScroll Down:=-33 End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using a Macro to look at Hidden Sheet | Excel Discussion (Misc queries) | |||
Macro Error When Connecting to Hidden Sheet | Excel Discussion (Misc queries) | |||
I need my Hidden Rows to stay hidden when I print the sheet. | Excel Discussion (Misc queries) | |||
how 2 hide row if row in another sheet is hidden? | Excel Discussion (Misc queries) | |||
Can a macro format a hidden sheet? | Excel Discussion (Misc queries) |