![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 39
|
What's wrong with this statement? I need to be able to copy and paste a range that is variable i.e. (C7:C12 this time, and perhaps Q7:Q13 the next time. The following statement looks to be "in the ball park", but it returns an error (Run-time error '1004': Application-defined or object-defined error).
The statement with hard coded row/cols follows: Worksheets("Sheet1").Range(Cells(20, 7), Cells(20, 23)).Copy Thanks _Mike |
|
|
|
|
|
#2 | |
|
Board Regular
Join Date: Mar 2002
Location: England, UK.
Posts: 526
|
Quote:
With Worksheets("Sheet1") .Range(.Cells(20, 7), .Cells(20, 23)).Copy End with Hope that works, RET79 |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|