Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro-continue to paste last column
Hi, i have a macro that copy columns A:G to sheet2, and then i select column
B and insert it before F column. The problem is that if i run macro many times, the macro continue to add the last column "G". So, the content of "G" column will be in "H", then in "I", Then in "J"...and so on. I will have G column content in several columns. And B column remains selected... If i remove insert column, the macro works perfect. This is my recorded macro: Range("A1").Select Sheets("Sheet1").Select Columns("A:G").Select Selection.Copy Range("B1").Select Sheets("Sheet2").Select Range("A1").Select ActiveSheet.Paste Columns("B:B").Select Application.CutCopyMode = False Selection.Copy Columns("F:F").Select Selection.Insert Shift:=xlToRight Range("B1").Select How to stop this? Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
macro to ask yes/no question and continue based on answer | Excel Discussion (Misc queries) | |||
Excel Macro: Pause & ask user: "Are you sure you want to continue? | Excel Discussion (Misc queries) | |||
VB code to continue macro | Excel Discussion (Misc queries) | |||
Create a button to continue old macro execution | Excel Discussion (Misc queries) | |||
Data Continue to next column? | Excel Discussion (Misc queries) |