Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem with assigning values to items in collection
I get "error 424" (object needed) when assigning values to items in
collection (see the red code). What do I wrong??? Thx, Jurry -------------------------- ' In a standard module Public Sub test() Dim l As Long Dim w As New wrdWord l = 9 w.value = l End Sub ---------------------------- ' In a class module! Public bit As New Collection Private Sub Class_Initialize() Dim i% For i = 0 To 15 bit.Add False Next i End Sub Property Let value(ByVal newValue As Long) Dim i% For i = 15 To 0 Step -1 If newValue - 2 ^ i = 0 Then bit(i + 1) = True newValue = newValue - 2 ^ i Else bit(i + 1) = False End If Next i End Propert -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Adding Unique Items to a Collection | Excel Discussion (Misc queries) | |||
Assigning values to words | Excel Discussion (Misc queries) | |||
Accessing values in points collection of chart & conditional display | Charts and Charting in Excel | |||
Problem Assigning Macros | Excel Worksheet Functions | |||
Compare Listbox values with Collection values | Excel Programming |