LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Strange behaviour of default property

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
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
Shortcut key strange behaviour BB programmer Excel Worksheet Functions 1 October 12th 06 12:53 AM
Shortcut key strange behaviour BB programmer Excel Worksheet Functions 2 October 11th 06 04:58 AM
Strange if(***) behaviour? Excel 2003 - SPB Excel Discussion (Misc queries) 6 August 6th 06 05:34 PM
Strange behaviour Edgar Thoemmes Excel Worksheet Functions 1 February 8th 05 03:20 PM
strange behaviour Patrick Molloy Excel Programming 0 September 4th 03 07:51 AM


All times are GMT +1. The time now is 10:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"