Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to Select a Row in VB Macro

Hello:

I have try to use the following statment for select a row
and work fine.

Rows("2:2").Select

After I have change the value as show below, it can't work!

Rows("RowX:RowX").Select

For the Value os RowX is 3 as integer.

Thanks!


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default How to Select a Row in VB Macro

Hi alan
Dim RowX&
RowX = 3
Rows(RowX).Select

HTH
Cordially
Pascal

"Alan Tang" a écrit dans le message de
...
Hello:

I have try to use the following statment for select a row
and work fine.

Rows("2:2").Select

After I have change the value as show below, it can't work!

Rows("RowX:RowX").Select

For the Value os RowX is 3 as integer.

Thanks!




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,489
Default How to Select a Row in VB Macro

Alan,

Try removing the variable names from within the quotes,

Rows(RowX & ":" & RowX).select

Also you may want to make the variable a Long, in case the value stored
is greater than 32,767.

Cheers
Andy

Alan Tang wrote:

Hello:

I have try to use the following statment for select a row
and work fine.

Rows("2:2").Select

After I have change the value as show below, it can't work!

Rows("RowX:RowX").Select

For the Value os RowX is 3 as integer.

Thanks!



--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
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
Macro to select last row msnyc07 Excel Worksheet Functions 1 May 28th 10 12:19 AM
Macro to select last row Jacob Skaria Excel Worksheet Functions 0 May 27th 10 09:33 PM
can't select a macro Donna[_2_] Excel Discussion (Misc queries) 0 May 15th 09 02:55 AM
Macro to select cells without a certain value and select a menu it Guy[_2_] Excel Worksheet Functions 9 January 2nd 09 05:21 PM
Select other workbook to select data in a macro. T Tromp Excel Programming 2 September 19th 03 01:43 PM


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