PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook VBA Programming selecting a range of cells

Reply

selecting a range of cells

 
Thread Tools Rate Thread
Old 03-03-2005, 02:25 AM   #1
Grandma Barb
Guest
 
Posts: n/a
Default selecting a range of cells


I am working in VBA and am still trying to select ranges.

This statement works to select all the rows that are used
in columns A to C
Set rng = Range("A1:C" & Cells(Rows.Count, "C").End
(xlUp).Row)
rng.Select

I am trying to select all the rows from 3 on down in
columns N and O. This does not work as it only gets
through row 32. What am I missing?

Set rng = Range("N3:O3" & Cells(Rows.Count, "O").End
(xlUp).Row)
rng.Select


  Reply With Quote
Old 03-03-2005, 06:36 AM   #2
Michael Bauer
Guest
 
Posts: n/a
Default Re: selecting a range of cells

Please go to an Excel VBA NG. This one is for Oulook.

--
Viele Grüße
Michael Bauer


"Grandma Barb" <barbs3506@aol.com> wrote in message
news:3bda01c51f98$4081ddf0$a401280a@phx.gbl...
> I am working in VBA and am still trying to select ranges.
>
> This statement works to select all the rows that are used
> in columns A to C
> Set rng = Range("A1:C" & Cells(Rows.Count, "C").End
> (xlUp).Row)
> rng.Select
>
> I am trying to select all the rows from 3 on down in
> columns N and O. This does not work as it only gets
> through row 32. What am I missing?
>
> Set rng = Range("N3:O3" & Cells(Rows.Count, "O").End
> (xlUp).Row)
> rng.Select
>
>


  Reply With Quote
Old 04-03-2005, 02:16 AM   #3
Grandma Barb
Guest
 
Posts: n/a
Default Re: selecting a range of cells


>-----Original Message-----
>Please go to an Excel VBA NG. This one is for Oulook.
>
>--
>Viele Grüße
>Michael Bauer
>
>
>"Grandma Barb" <barbs3506@aol.com> wrote in message
>news:3bda01c51f98$4081ddf0$a401280a@phx.gbl...
>> I am working in VBA and am still trying to select

ranges.
>>
>> This statement works to select all the rows that are

used
>> in columns A to C
>> Set rng = Range("A1:C" & Cells(Rows.Count, "C").End
>> (xlUp).Row)
>> rng.Select
>>
>> I am trying to select all the rows from 3 on down in
>> columns N and O. This does not work as it only gets
>> through row 32. What am I missing?
>>
>> Set rng = Range("N3:O3" & Cells(Rows.Count, "O").End
>> (xlUp).Row)
>> rng.Select
>>
>>

>
>.
>OK just tell me what and where is a VBA NG. --Grandma

Barb
  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off