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: 25
Default Simple Copy-Paste logic not working

Here is my block of code.

<<<
Dim ws As Worksheet
Dim rowId as Integer

Set ws = ThisWorkbook.Worksheets("Sheet1")

For rowId = 1 to 10
ws.Range(Cells(rowId, 1), Cells(rowId, 2)).Copy _
ws.Range(Cells(rowId, 1), Cells(rowId, 2)).Offset(1, 0)
'[fails at this step!!!]
Next rowId

<<<

It works on my machine at home... but fails on my work computer. Both
machines are XP Pro SP2 with Office 2003 installed.

The error I get is : Runtime error 1004 - Method 'Range' of object
'_Worksheet' failed

I've seen the problem before, but can't remember what/why it doesn't work.

Any help would be greatly appreciated.
Brian




 
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
Line copy - Not just a simple copy paste Ninerref Excel Worksheet Functions 3 September 10th 09 11:44 AM
Simple Copy and Paste Michael Excel Programming 1 March 7th 05 09:18 AM
Simple Copy & Paste Bob Barnes[_3_] Excel Programming 3 February 20th 04 11:09 PM
Help! What's wrong with this simple copy and paste Richard James[_3_] Excel Programming 4 November 23rd 03 12:57 AM
Simple copy and paste Fritz[_2_] Excel Programming 2 November 22nd 03 01:56 PM


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