Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
macro to ask yes/no question and continue based on answer JasonP CCTM LV Excel Discussion (Misc queries) 5 July 18th 08 10:29 PM
Excel Macro: Pause & ask user: "Are you sure you want to continue? RoBear! Excel Discussion (Misc queries) 6 March 13th 08 09:14 AM
VB code to continue macro Brian Excel Discussion (Misc queries) 3 May 9th 06 03:12 AM
Create a button to continue old macro execution Brian Excel Discussion (Misc queries) 0 May 15th 05 10:22 PM
Data Continue to next column? Drew Excel Discussion (Misc queries) 1 January 8th 05 09:43 PM


All times are GMT +1. The time now is 06:10 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"