Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 68
Default rows().select VBA question

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 367
Default rows().select VBA question

On Nov 28, 9:49 am, mohavv wrote:
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
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 947
Default rows().select VBA question

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

--
HTH :)
Dana DeLouis


"mohavv" wrote in message
...
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



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
Cannot select rows in VBA [email protected] Excel Discussion (Misc queries) 1 September 6th 07 04:00 AM
How can i randomly select 780 rows from 4000 rows of data bbb Excel Worksheet Functions 2 July 6th 07 08:21 PM
select rows [email protected] Excel Worksheet Functions 1 March 1st 06 03:57 AM
VBA select case question Jeff Excel Discussion (Misc queries) 2 January 27th 06 03:03 AM
Unable to select rows in the repeat rows on top option Noppie Excel Discussion (Misc queries) 2 December 28th 04 03:17 PM


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