Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default how to copy a sheet to diferent workbook. no paste

With your help finally I got it rite:

Sub macro1()
' Moving Data Macro'
Workbooks.Open Filename:= "C:\MYLOCATION\Source.csv"
ActiveWindow.Visible = False
Windows("Source.csv").Visible = True
Range("A1:G1500").Copy
(Workbooks("Destination.xls").Sheets("Sheet2").Ran ge("A1:G1500"))
Workbooks("Source.csv").Close SaveChanges:=False
Windows("Destination.xls").Activate
Sheet2.Select
Columns("A:G").EntireColumn.AutoFit
End Sub

My 2003 Excel didnt like me to use := to specify the destination. () after
copy was good enough.

Thanks again Jim

"Jim Jackson" wrote:

You can use:
Wbk1.Activate
Sheets("datasource").Activate
Range("A1:B50").Select
ThisWorkbook.ActiveSheet.Range("C" & rnum) = Selection
--
Best wishes,

Jim


"aidan" wrote:

I want to copy a range from one workbook to a different one without useing
paste

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 324
Default how to copy a sheet to diferent workbook. no paste

Glad I could help.
--
Best wishes,

Jim


"aidan" wrote:

With your help finally I got it rite:

Sub macro1()
' Moving Data Macro'
Workbooks.Open Filename:= "C:\MYLOCATION\Source.csv"
ActiveWindow.Visible = False
Windows("Source.csv").Visible = True
Range("A1:G1500").Copy
(Workbooks("Destination.xls").Sheets("Sheet2").Ran ge("A1:G1500"))
Workbooks("Source.csv").Close SaveChanges:=False
Windows("Destination.xls").Activate
Sheet2.Select
Columns("A:G").EntireColumn.AutoFit
End Sub

My 2003 Excel didnt like me to use := to specify the destination. () after
copy was good enough.

Thanks again Jim

"Jim Jackson" wrote:

You can use:
Wbk1.Activate
Sheets("datasource").Activate
Range("A1:B50").Select
ThisWorkbook.ActiveSheet.Range("C" & rnum) = Selection
--
Best wishes,

Jim


"aidan" wrote:

I want to copy a range from one workbook to a different one without useing
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 enable Copy and Paste when the sheet and workbook is protected Yuvraj Excel Discussion (Misc queries) 1 July 20th 09 04:24 PM
Compare two Worksheet and copy the diferent rows to other CC Excel Discussion (Misc queries) 0 December 10th 08 04:48 PM
Copy and paste data from one sheet to another in a single workbook SITCFanTN Excel Programming 0 June 10th 06 01:58 PM
I cannot paste from one workbook to another. Copy works, paste do. JimmyMc Excel Discussion (Misc queries) 1 June 10th 05 03:54 PM
automatic copy and paste from sheet to sheet in a workbook ramseyjramseyj Excel Programming 6 December 11th 04 12:37 AM


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