LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Copy and paste selected columns between Excel workbooks

Hi,

I am trying to copy a selected number of columns from one workbook
and
paste it into another worksheet in a second workbook.


I keep on getting an error on ActiveSheet.Paste.(ie. TargetWS.Paste
below)


How can i get round this or better still could a vb champion show me
the correct way to do this.


Thanks.


kolu


Set SrcWkb = Workbooks("source.xls")


Application.Windows("source.xls").Activate
Columns("G:I").Select
Application.CutCopyMode = False
Selection.Copy
Application.Windows("Target.xls").Activate
Columns("G:I").Select
With TargetWkb.Worksheets("sheet")
TargetWS.Paste
End With


The error message i get is : object invoked has disconnected from its
cilents when i execute TargetWS.Paste
 
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
Can't Copy and Paste or Paste Special between Excel Workbooks wllee Excel Discussion (Misc queries) 5 April 29th 23 03:43 AM
Copy/ move selected data from workbooks to seperate worksheets or workbooks Positive Excel Worksheet Functions 1 August 30th 07 04:54 PM
How I can copy / paste a selected cells to other columns in Excel M.Rafat Excel Discussion (Misc queries) 4 November 7th 06 05:42 AM
How do I copy selected cells in excel and paste into word table REVA Excel Programming 2 January 4th 06 09:43 PM
How to Copy & Paste selected Range in Excel (MFC) Daniel Xu Excel Programming 6 November 25th 03 02:42 AM


All times are GMT +1. The time now is 01:51 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"