S
S Ruhmann
Hi all
I have a macro button that tells excel to go to another sheet, copy a block of rows and then past those rows into the original sheet. The problem I have is that the block of cells I'm copying also has a macro button which also prompts excel to go to a different sheet and copy and past a row (this is a nested marco)
The problem is that when i copy the top level macro, the embedded macro no longer pastes its row in the current sheet, it goes to the other sheet. So, my question is, how do I change the embedded macro so that it always uses the current sheet as the reference
I've copied the two macros below
Sub InsertExecElem(
' InsertExecElem Macr
' Macro recorded 4/2/2004 by IBM_Use
Sheets("Insert Exec Elem Sheet").Selec
Rows("7:12").Selec
Selection.Cop
Sheets("Country Execution Template").Selec
Rows("7:7").Selec
Selection.Insert Shift:=xlDow
Range("B7").Selec
Application.Run
"'Country Program Execution Template - 040204-4.xls'!InsertTactic
End Su
Sub InsertTactic(
' InsertTactic Macr
' Macro recorded 4/2/2004 by IBM_Use
Sheets("Insert Tactic Sheet").Selec
Rows("7:7").Selec
Selection.Cop
Sheets("Insert Exec Elem Sheet").Selec
Rows("9:9").Selec
Selection.Insert Shift:=xlDow
End Sub
I have a macro button that tells excel to go to another sheet, copy a block of rows and then past those rows into the original sheet. The problem I have is that the block of cells I'm copying also has a macro button which also prompts excel to go to a different sheet and copy and past a row (this is a nested marco)
The problem is that when i copy the top level macro, the embedded macro no longer pastes its row in the current sheet, it goes to the other sheet. So, my question is, how do I change the embedded macro so that it always uses the current sheet as the reference
I've copied the two macros below
Sub InsertExecElem(
' InsertExecElem Macr
' Macro recorded 4/2/2004 by IBM_Use
Sheets("Insert Exec Elem Sheet").Selec
Rows("7:12").Selec
Selection.Cop
Sheets("Country Execution Template").Selec
Rows("7:7").Selec
Selection.Insert Shift:=xlDow
Range("B7").Selec
Application.Run
"'Country Program Execution Template - 040204-4.xls'!InsertTactic
End Su
Sub InsertTactic(
' InsertTactic Macr
' Macro recorded 4/2/2004 by IBM_Use
Sheets("Insert Tactic Sheet").Selec
Rows("7:7").Selec
Selection.Cop
Sheets("Insert Exec Elem Sheet").Selec
Rows("9:9").Selec
Selection.Insert Shift:=xlDow
End Sub