Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using Select with Range.Cells property

Can anyone tell me why:

Range(Cells(iNameR, iNameC + 3), Cells(iNameR, iNameC + iCount + 2)).Select

works while:

Range(Cells(iTargetR, iTarDateC)).Select

returns the runtime error '1004' method 'Range' of object '_Global'

TIA


--
remove 901 from reply email for valid address.


-----
remove


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Using Select with Range.Cells property

Assuming here that iTargetR is an integer between 1 and 65536 and iTarDateC
is an integer between 1 and 256

Try just Cells(iTargetR, iTarDateC).Select


--
Rob van Gelder - http://www.vangelder.co.nz/excel


" Ralph Heidecke" wrote in message
news:%S0Gd.81947$8l.66029@pd7tw1no...
Can anyone tell me why:

Range(Cells(iNameR, iNameC + 3), Cells(iNameR, iNameC + iCount +
2)).Select

works while:

Range(Cells(iTargetR, iTarDateC)).Select

returns the runtime error '1004' method 'Range' of object '_Global'

TIA


--
remove 901 from reply email for valid address.


-----
remove




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Using Select with Range.Cells property

Range can not take a single range object as an argument. Range(Range1) is
not legal syntax. Range(Range1,Range2) is. (Rangex represents a range
object).

--
Regards,
Tom Ogilvy
" Ralph Heidecke" wrote in message
news:%S0Gd.81947$8l.66029@pd7tw1no...
Can anyone tell me why:

Range(Cells(iNameR, iNameC + 3), Cells(iNameR, iNameC + iCount +

2)).Select

works while:

Range(Cells(iTargetR, iTarDateC)).Select

returns the runtime error '1004' method 'Range' of object '_Global'

TIA


--
remove 901 from reply email for valid address.


-----
remove




Reply
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
Select a range of cells wx4usa Excel Discussion (Misc queries) 2 December 23rd 09 07:32 PM
When entering data into a range of cells, select the entire range. Q Excel Discussion (Misc queries) 0 September 26th 07 04:36 AM
select a range using "cells()" fullers Excel Worksheet Functions 2 July 6th 05 06:00 PM
How to select range of cells Jan Nademlejnsky Excel Programming 2 December 10th 04 02:51 AM
Can Range.Find search a Cells' Text property? clarence_rollins Excel Programming 2 August 25th 03 12:20 AM


All times are GMT +1. The time now is 07:51 AM.

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"