How to Select a Row in VB Macro

  • Thread starter Thread starter Alan Tang
  • Start date Start date
A

Alan Tang

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!
 
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
 
Back
Top