Thread: Range in a row
View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
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