Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Copy range from one workbook to another

Hi All,

I am trying to copy a range from one workbook to another. Other posts say
you cannot copy from an inactive worksheet, but when I copy to the
clipboard, open or activate the other workbook, it fails.

Workbooks("349999M.xls").Worksheets("Sheet1").Rang e("A1:E14").Copy
Workbooks.Open "\\Server1\BellPit.xls", False
ActiveWorkbook.Worksheets(1).Activate
Cells(1, 1).Activate
ActiveSheet.Paste

Any help would be great,
Thanks
Chad


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Copy range from one workbook to another

Workbooks("349999M.xls").Worksheets("Sheet1").Rang e("A1:E14").Copy
Workbooks.Open "\\Server1\BellPit.xls", False
Workbooks("Bellpit").Worksheets(1).Cells(1, 1).Paste

"Chad" wrote:

Hi All,

I am trying to copy a range from one workbook to another. Other posts say
you cannot copy from an inactive worksheet, but when I copy to the
clipboard, open or activate the other workbook, it fails.

Workbooks("349999M.xls").Worksheets("Sheet1").Rang e("A1:E14").Copy
Workbooks.Open "\\Server1\BellPit.xls", False
ActiveWorkbook.Worksheets(1).Activate
Cells(1, 1).Activate
ActiveSheet.Paste

Any help would be great,
Thanks
Chad



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Copy range from one workbook to another

Better yet:
Workbooks.Open "\\Server1\BellPit.xls", False
Workbooks("349999M.xls").Worksheets("Sheet1").Rang e("A1:E14").Copy
Destination:=Workbooks("Bellpit").Worksheets(1).Ce lls(1, 1)


"Chad" wrote:

Hi All,

I am trying to copy a range from one workbook to another. Other posts say
you cannot copy from an inactive worksheet, but when I copy to the
clipboard, open or activate the other workbook, it fails.

Workbooks("349999M.xls").Worksheets("Sheet1").Rang e("A1:E14").Copy
Workbooks.Open "\\Server1\BellPit.xls", False
ActiveWorkbook.Worksheets(1).Activate
Cells(1, 1).Activate
ActiveSheet.Paste

Any help would be great,
Thanks
Chad



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Copy range from one workbook to another

Sorry, for the delay,

Thanks
Chad
"JLGWhiz" wrote in message
...
Better yet:
Workbooks.Open "\\Server1\BellPit.xls", False
Workbooks("349999M.xls").Worksheets("Sheet1").Rang e("A1:E14").Copy
Destination:=Workbooks("Bellpit").Worksheets(1).Ce lls(1, 1)


"Chad" wrote:

Hi All,

I am trying to copy a range from one workbook to another. Other posts
say
you cannot copy from an inactive worksheet, but when I copy to the
clipboard, open or activate the other workbook, it fails.

Workbooks("349999M.xls").Worksheets("Sheet1").Rang e("A1:E14").Copy
Workbooks.Open "\\Server1\BellPit.xls", False
ActiveWorkbook.Worksheets(1).Activate
Cells(1, 1).Activate
ActiveSheet.Paste

Any help would be great,
Thanks
Chad





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Copy range from one workbook to another

Actually it didn't work

Here is my code

Workbook 07125M.xls is already open and active when the following code is
executed. The error is "Subscript is out of range"

Workbooks.Open "\\Server1\Data\Engineering\Highwall
Monitors\SLOPE_MONITORING_1XX_BellPit.xls", False
Workbooks("07125M").Worksheets("Sheet1").Range("A1 :E16").Copy
Destination:=Workbooks("SLOPE_MONITORING_1XX_BellP it").Worksheets(1).Cells(1,
1)


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
copy range from one workbook to other in C# asp newbie Excel Worksheet Functions 0 May 17th 06 06:44 AM
copy a range from another workbook Spencer Hutton[_3_] Excel Programming 1 December 22nd 04 05:07 PM
Need a macro to copy a range in one workbook and paste into another workbook Paul Excel Programming 8 July 1st 04 07:42 AM
Copy a range of cells in an unopened workbook and paste it to the current workbook topstar Excel Programming 3 June 24th 04 12:50 PM


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