 |
|
VBA - Application-defined or object-defined error
Tina,
Try fully qualifying the Cells. Change
Set range_paste = ActiveSheet.Range(Cells(10, 2 * j + 1),Cells(29, 2 * j +
1))
to
Set range_paste = ActiveSheet.Range( _
ActiveSheet.Cells(10, 2 * J + 1), ActiveSheet.Cells(29, 2 * J + 1))
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
www.cpearson.com
"Tina" wrote in message
om...
Hi,
I am trying to assign a range dynamically to the range variable. but
it is giving me the error "Application-defined or object-defined
error". please help me out. i have a project deadline and i have
already spent hours to figure this one out, but no luck.
If (Workbooks("Manager").Sheets("Main").CheckBox8.Val ue = True) Then
Workbooks("Manager").Sheets("trial").Activate
Set range_copy = ActiveSheet.Range("q7:q26")
range_copy.Copy
range_paste.PasteSpecial
' range_paste is set to Workbooks("Game").Sheets("Data").Range("C10")
j = j + 1
Workbooks("Game").Sheets("Data").Activate
Set range_paste = ActiveSheet.Range(Cells(10, 2 * j + 1),
Cells(29, 2 * j + 1)) ***** Error at this line
End If
Thanks!
Tina
|
All times are GMT +1. The time now is 06:55 AM. |
|
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com