Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default selection command, problem with column index

I'm using the selection command and I'm havinig trouble with the columnindex.

With Selection
Range(.Cells, Cells(.Row, "iv")).Select
End With

The above works fine but when I use column instead if row as below:

With Selection
Range(.Cells, Cells(.Column, "6000")).Select
End With

I get an Run-time error 1004 application-defined or object-definde error

I believe it's because i'm not using the correct column indexing.


thanks for any help darron
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default selection command, problem with column index

Hi Darron

It is Cells(row,column)

Not column,row

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Darron Ross" wrote in message ...
I'm using the selection command and I'm havinig trouble with the columnindex.

With Selection
Range(.Cells, Cells(.Row, "iv")).Select
End With

The above works fine but when I use column instead if row as below:

With Selection
Range(.Cells, Cells(.Column, "6000")).Select
End With

I get an Run-time error 1004 application-defined or object-definde error

I believe it's because i'm not using the correct column indexing.


thanks for any help darron

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default selection command, problem with column index

Darron,

Try it this way:

With Selection
Range(.Cells, Cells(6000, .Column)).Select
End With



"Darron Ross" wrote:

I'm using the selection command and I'm havinig trouble with the columnindex.

With Selection
Range(.Cells, Cells(.Row, "iv")).Select
End With

The above works fine but when I use column instead if row as below:

With Selection
Range(.Cells, Cells(.Column, "6000")).Select
End With

I get an Run-time error 1004 application-defined or object-definde error

I believe it's because i'm not using the correct column indexing.


thanks for any help darron

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
Sorting results from the Index command Anderson Excel Worksheet Functions 1 December 21st 07 04:36 PM
Sheet Selection using a Ranged index Matthew Balch[_2_] Excel Programming 5 September 26th 06 10:40 AM
Index on a selection [KiO] ASamarcos Excel Programming 3 August 15th 06 11:30 PM
Index of Cells in a selection Rod[_6_] Excel Programming 4 November 16th 03 10:35 AM
Index of cells in a selection Rod[_6_] Excel Programming 0 November 14th 03 09:01 PM


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