Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Mikhail:
It may depend on how the range rFeedType is defined. Cells is not always the default property of a range. See this recent discussion: http://google.com/groups?hl=en&lr=&i...GP12.phx.g bl Regards, Vasant. "Mikhail" wrote in message ... I have copied an example from Mr. Walkenbach website about how to fill a listbox with non-duplicated values. we declare a collection and fiil it with values from a range. rFeedType is declared as range Dim rFeedType as Range Dim NoDupes as New Collection On Error Resume Next For Each Cell In rFeedType.Cells 'if I write For Each Cell In rFeedType '<- this line causes problem if.Cells is removed. NoDupes.Add Cell.Value, CStr(Cell.Value) Next Cell 'Resume normal error handling On Error GoTo 0 If I write For Each Cell In rFeedType the ListBox becomes empty In original example .Cells is not used. Sometimes it works without .Cells OK. Is it some glitch in Excel itself? TIA, Mike510 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Shortcut key strange behaviour | Excel Worksheet Functions | |||
Shortcut key strange behaviour | Excel Worksheet Functions | |||
Strange if(***) behaviour? | Excel Discussion (Misc queries) | |||
Strange behaviour | Excel Worksheet Functions | |||
strange behaviour | Excel Programming |