Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"as just the name"
would be better as: "as just the VALUE" (not name) Dave Peterson wrote: The parenthesis makes excel want to "evaluate" what's inside them. And that means that tmpname gets passed as just the name (tmpname.value which would evaluate to something like: =sheet1!$a$1). So in one case (with the parens) you're passing a bunch of strings to the collection. In the other (without the parens), you're passing real name objects--and all their properties. Kind of close to the difference between Dim myVal As Variant 'not range! myval = activesheet.range("a1:a10") 'or set myval = activesheet.range("a1:a10") The top creates a 10 row by 1 column array of values. The bottom assigns a range object to A1:A10. And all those properties are still available. (kind of...) Tim Richardson wrote: Dave Peterson wrote: Drop the ()'s around the (TmpName) in the .add line and it'll work ok. thanks. That worked. But why does this fail: "myCollection.Add (tmpName) " and why does this work? myCollection.Add tmpName -- Dave Peterson -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Need Help with Set Object = Collection(index) | Excel Programming | |||
Collection Object, 255 item limitation | Excel Programming | |||
Problems returning Collection object | Excel Programming | |||
Collection Object Keys | Excel Programming | |||
CombBox - Object of What Collection? | Excel Programming |