Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I wrote a procedure a bit like this:
For Each rngCell in rngEmployees lstEmployees.Additem rngCell Next rngCell rngEmployees is a one-column range filled with employee's names. This code is trivial and I have been doing it for 10 years without problems. Today for the first time a colleague executing this piece of code calls me and shows me that an error is raised with the .Additem method (Type mismatch). The debugger says rngCell is definitely a string (like "Joe Smith"), not a number, nor anything else. The strange thing is that it works well on my computer. When I change lstEmployees.Additem rngCell into lstEmployees.Additem rngCell.Value then it works on both computers. Can someone explain me this? Isn't it that .value is the default property of the Range class? I am really really lost! Many thanks and have a good day. Stefano Gatto |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Why doesn't status bar update consistently? | Excel Programming | |||
CPU Usage consistently above 75% | Excel Discussion (Misc queries) | |||
Runtime error 380: Could not set the List property. invalid property value of listbox | Excel Programming | |||
Strange behaviour of default property | Excel Programming | |||
How to find what object type is returned from Selection property ? | Excel Programming |