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: 5
Default Copy cell data Workbook to Workbook

Hello,

I am trying to copy the contents of the
active sheet in the active workbook to
sheet1 of a second named workbook.

I get an error when starting loop to
check each cell[range] in the Active
Sheet.

What am I doing wrong? Much Thanks...

Paul


Dim oRange As Range

Dim MatrixWB As Workbook
Dim ActiveWB As Workbook

Set MatrixWB = Application.Workbooks("AssemblyMatrix.xls")
Set ActiveWB = Application.ActiveWorkbook
'Error when trying to check each cell in the Active sheet?
For Each oRange In ActiveWB.ActiveSheet

If Not oRange.Value = "" Then
With MatrixWB.Sheets("Sheet1")
.Cells(oRange.Row, oRange.Column).Value = _
oRange.Value
End With
End If

Next oRange
 
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
Need to copy and match data from one workbook to another workbook clc_80 Excel Worksheet Functions 1 April 6th 10 11:41 PM
Search Data from one Workbook and copy it into another Workbook Matz Excel Discussion (Misc queries) 0 August 4th 06 10:45 AM
Copy Data from Workbook into specific Worksheet in other Workbook? kingdt Excel Discussion (Misc queries) 1 March 16th 06 06:55 PM
copy excel workbook to new workbook without data Omnitool Excel Worksheet Functions 3 March 14th 06 10:49 PM
conditional copy data from workbook to another workbook Chris Garrett Excel Programming 0 September 28th 04 03:19 AM


All times are GMT +1. The time now is 12:59 PM.

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

About Us

"It's about Microsoft Excel"