Hello All
I have a small problem here, I am new to VBA as you will see. The Following is my code I have written to copy a range from a Sample1 sheet and insert into the active sheet which is assigned as a variable. But when I run the macro it inserts the range into "A1"
I would like it to insert on the active sheet, in the active cell?
Sub Block()
'
' Block Macro
' Macro recorded 2009-03-20 by User
'
' Keyboard Shortcut: Ctrl+d
'
Range(ActiveCell.Address).Name = "StartCell"
Application.Goto "StartCell"
'Assign variable to active worksheet
Var1 = ActiveSheet.Name
'Insert three new rows
Sheets(Var1).Range("A1:E3").Insert Shift:=xlDown
'Copy Range from Sample worksheet
Sheets("Sample1").Range("A1:E4").copy Sheets(Var1).Range("A1")
Application.Goto "StartCell"
End Sub
Bmeyer
I have a small problem here, I am new to VBA as you will see. The Following is my code I have written to copy a range from a Sample1 sheet and insert into the active sheet which is assigned as a variable. But when I run the macro it inserts the range into "A1"
I would like it to insert on the active sheet, in the active cell?
Sub Block()
'
' Block Macro
' Macro recorded 2009-03-20 by User
'
' Keyboard Shortcut: Ctrl+d
'
Range(ActiveCell.Address).Name = "StartCell"
Application.Goto "StartCell"
'Assign variable to active worksheet
Var1 = ActiveSheet.Name
'Insert three new rows
Sheets(Var1).Range("A1:E3").Insert Shift:=xlDown
'Copy Range from Sample worksheet
Sheets("Sample1").Range("A1:E4").copy Sheets(Var1).Range("A1")
Application.Goto "StartCell"
End Sub
Bmeyer