Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default Range in a row

Hi
here is what i use in a combobox

Dim rng As Range
Set rng = Range(Range("a1"), Range("a1").End(xlDown))
Me.navne.List = rng.Value

This working
How can i use this to take the range in row 1 not down.

Alvin

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Range in a row

There's a reply at your other post.

alvin Kuiper wrote:

Hi
here is what i use in a combobox

Dim rng As Range
Set rng = Range(Range("a1"), Range("a1").End(xlDown))
Me.navne.List = rng.Value

This working
How can i use this to take the range in row 1 not down.

Alvin


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default Range in a row

thanks
but not the same
I try to use
Set rng = Range(Range("a1"), Range("a1").End(xlToRight))

but get only one value off course i can use
Set rng = Range(Range("a1"), Range("a255").End(xlToRight))
But then i get also the empty cells

Alvin


"Dave Peterson" wrote:

There's a reply at your other post.

alvin Kuiper wrote:

Hi
here is what i use in a combobox

Dim rng As Range
Set rng = Range(Range("a1"), Range("a1").End(xlDown))
Me.navne.List = rng.Value

This working
How can i use this to take the range in row 1 not down.

Alvin


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default Range in a row

Set rng = Range(Cells(1, 1), Cells(1, Cells(1,
Columns.Count).End(xlToLeft).Column))

"alvin Kuiper" wrote:

thanks
but not the same
I try to use
Set rng = Range(Range("a1"), Range("a1").End(xlToRight))

but get only one value off course i can use
Set rng = Range(Range("a1"), Range("a255").End(xlToRight))
But then i get also the empty cells

Alvin


"Dave Peterson" wrote:

There's a reply at your other post.

alvin Kuiper wrote:

Hi
here is what i use in a combobox

Dim rng As Range
Set rng = Range(Range("a1"), Range("a1").End(xlDown))
Me.navne.List = rng.Value

This working
How can i use this to take the range in row 1 not down.

Alvin


--

Dave Peterson

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default Range in a row

Hi topper
MAybe i do it wrong?
I have
Dim rng As Range
Set rng = Range(Cells(1, 1), Cells(1, Cells(1,
Columns.Count).End(xlToLeft).Column))

Me.navne.List = rng.Value

But i only get one value

Alvin


"Toppers" wrote:

Set rng = Range(Cells(1, 1), Cells(1, Cells(1,
Columns.Count).End(xlToLeft).Column))

"alvin Kuiper" wrote:

thanks
but not the same
I try to use
Set rng = Range(Range("a1"), Range("a1").End(xlToRight))

but get only one value off course i can use
Set rng = Range(Range("a1"), Range("a255").End(xlToRight))
But then i get also the empty cells

Alvin


"Dave Peterson" wrote:

There's a reply at your other post.

alvin Kuiper wrote:

Hi
here is what i use in a combobox

Dim rng As Range
Set rng = Range(Range("a1"), Range("a1").End(xlDown))
Me.navne.List = rng.Value

This working
How can i use this to take the range in row 1 not down.

Alvin

--

Dave Peterson



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default Range in a row

Ok I use

Dim rng As Range
Set rng = Range(Cells(1, 1), Cells(1, Cells(1,
Columns.Count).End(xlToLeft).Column))
For Each a In rng
navne.AddItem a.Text
Next
so every thing is allright thanks

Alvin


"Toppers" wrote:

Set rng = Range(Cells(1, 1), Cells(1, Cells(1,
Columns.Count).End(xlToLeft).Column))

"alvin Kuiper" wrote:

thanks
but not the same
I try to use
Set rng = Range(Range("a1"), Range("a1").End(xlToRight))

but get only one value off course i can use
Set rng = Range(Range("a1"), Range("a255").End(xlToRight))
But then i get also the empty cells

Alvin


"Dave Peterson" wrote:

There's a reply at your other post.

alvin Kuiper wrote:

Hi
here is what i use in a combobox

Dim rng As Range
Set rng = Range(Range("a1"), Range("a1").End(xlDown))
Me.navne.List = rng.Value

This working
How can i use this to take the range in row 1 not down.

Alvin

--

Dave Peterson

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Range in a row

There wouldn't be any difference with Dave's answer, so I guess your not
knowing how to loop through the results was/is the problem as well.

Even Toppers approach could be reduced to

Set rng = Range(Cells(1, 1), Cells(1, _
Columns.Count).End(xlToLeft))

--
Regards,
Tom Ogilvy


"alvin Kuiper" wrote in message
...
Ok I use

Dim rng As Range
Set rng = Range(Cells(1, 1), Cells(1, Cells(1,
Columns.Count).End(xlToLeft).Column))
For Each a In rng
navne.AddItem a.Text
Next
so every thing is allright thanks

Alvin


"Toppers" wrote:

Set rng = Range(Cells(1, 1), Cells(1, Cells(1,
Columns.Count).End(xlToLeft).Column))

"alvin Kuiper" wrote:

thanks
but not the same
I try to use
Set rng = Range(Range("a1"), Range("a1").End(xlToRight))

but get only one value off course i can use
Set rng = Range(Range("a1"), Range("a255").End(xlToRight))
But then i get also the empty cells

Alvin


"Dave Peterson" wrote:

There's a reply at your other post.

alvin Kuiper wrote:

Hi
here is what i use in a combobox

Dim rng As Range
Set rng = Range(Range("a1"), Range("a1").End(xlDown))
Me.navne.List = rng.Value

This working
How can i use this to take the range in row 1 not down.

Alvin

--

Dave Peterson



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
How do I enter formula sum(range+range)*0.15 sumif(range=3) tkw Excel Discussion (Misc queries) 2 October 1st 09 09:17 PM
Excel Addin:Setting the range to the Excel.Range object range prop Rp007 Excel Worksheet Functions 5 November 24th 06 04:30 PM
Range Question / error 1004: method Range of object Worksheet has failed Paul Excel Programming 3 April 7th 05 02:56 PM
Range.Find returns cell outside of range when range set to single cell Frank Jones Excel Programming 12 June 10th 04 04:22 AM
how to? set my range= my UDF argument (range vs. value in range) [advanced?] Keith R[_3_] Excel Programming 2 August 11th 03 05:55 PM


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