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