Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Paste selected columns from worksheet in a workbook to anotherworkbook

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Paste selected columns from worksheet in a workbook to anotherworkbook

On 4 Apr, 01:50, Orimslala wrote:
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
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
How to print separated, selected columns on a worksheet NavyPianoMan Excel Discussion (Misc queries) 11 August 29th 07 12:30 PM
FROM A HUGE SHEET, A PORTION OF IT IS SELECTED TO PASTE IT IN A NEW WORKSHEET BUT UNABLE TO CAPTGNVR Excel Discussion (Misc queries) 1 February 6th 07 06:14 AM
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
workbook update each time a new worksheet is selected DJL New Users to Excel 3 December 15th 05 01:48 PM
Update workbook each time a different worksheet is selected DJL New Users to Excel 2 December 15th 05 01:45 PM


All times are GMT +1. The time now is 07:47 PM.

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"