rows().select VBA question

  • Thread starter Thread starter mohavv
  • Start date Start date
M

mohavv

How can I make this work, keep getting errors.

Sub test2()

a = 327
b = 336

Rows(a:b).Select

End Sub

I just want to select/delete severals row at once at a variable spot.

Cheers,

Harold
 
How can I make this work, keep getting errors.

Sub test2()

a = 327
b = 336

Rows(a:b).Select

End Sub

I just want to select/delete severals row at once at a variable spot.

Cheers,

Harold

it's

Rows(a & ":" & b).select

hth

Carlo
 
How can I make this work, keep getting errors.
Sub test2()
a = 327
b = 336
Rows(a:b).Select

Just a different method without strings:

Sub Demo()
Dim a As Long, b As Long

a = 327
b = 336

Rows(a).Resize(b - a + 1).Select
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top