Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Dynamic Row Selection



I'm trying to select rows based on a parameter passed to the sub
procedure that selects the row.

I know if I want a set row then I could do:

Rows(6:6).Select

However, let's say I have a parameter r that contains the row number I
want to select.

I tried:

Rows(r.Value + ":" + r.Value).Select

However, this just gives me an error.

Any help would be appreciated.

Thanks!

- Bruce

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Dynamic Row Selection

rows(6).Select

works as well,

rw = 6
rows(rw).Select

Regards,
Tom Ogilvy


"Bruce B" wrote in message
...


I'm trying to select rows based on a parameter passed to the sub
procedure that selects the row.

I know if I want a set row then I could do:

Rows(6:6).Select

However, let's say I have a parameter r that contains the row number I
want to select.

I tried:

Rows(r.Value + ":" + r.Value).Select

However, this just gives me an error.

Any help would be appreciated.

Thanks!

- Bruce

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Dynamic Row Selection

What's the data type of r.value? Was the error a 1004?
-----Original Message-----


I'm trying to select rows based on a parameter passed to

the sub
procedure that selects the row.

I know if I want a set row then I could do:

Rows(6:6).Select

However, let's say I have a parameter r that contains

the row number I
want to select.

I tried:

Rows(r.Value + ":" + r.Value).Select

However, this just gives me an error.

Any help would be appreciated.

Thanks!

- Bruce

*** Sent via Developersdex http://www.developersdex.com

***
Don't just participate in USENET...get rewarded for it!
.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Dynamic Row Selection



The variable was an integer.

I think the first two replies should work.

Thanks for the help!

- Bruce

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
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
Dynamic Range Selection Using VBA TEK Excel Discussion (Misc queries) 2 January 23rd 10 04:55 AM
SUBTOTAL - dynamic selection Totteridge Ram Excel Worksheet Functions 3 December 17th 08 01:09 AM
Need Help on Dynamic Range Selection anshu[_2_] Excel Discussion (Misc queries) 5 July 12th 07 07:52 AM
dynamic selection of cells parthaemail New Users to Excel 1 April 25th 06 12:13 PM
Macro - Dynamic cell selection Chris Excel Discussion (Misc queries) 1 January 11th 06 01:48 PM


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