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: 130
Default Setting range by cells fails

Hello,
I have been trying to set a range using the following code:

Dim RNG as Range
Set RNG = worksheets("test").Range(cells(1,1),cells(10,10))

This fails with an error 1004

but if I use this code
Dim RNG as Range
Set RNG = worksheets("test").Range("A1:J10)

The code works.

This is the same range, why won't the compiler accept the first code?

thanks,
andy
 
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
Setting Curline to 0 on a text box fails (Excel 2007) Andrew B Excel Programming 3 August 30th 09 09:15 AM
Setting up formatting for a range of cells [email protected] Excel Discussion (Misc queries) 0 January 4th 07 04:17 PM
Setting an array range of cells??? Simon Lloyd[_773_] Excel Programming 2 June 16th 06 03:30 AM
Setting OnAction Property Fails Josh Sale Excel Programming 13 August 31st 05 09:02 PM
Setting CommandText property of PivotCache fails if cache has 1 PivotTable ashortxl Excel Programming 1 May 20th 05 10:27 PM


All times are GMT +1. The time now is 01:25 AM.

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"