Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
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
Adding Unique Items to a Collection WJ Excel Discussion (Misc queries) 2 June 12th 07 03:46 PM
Assigning values to words cardingtr Excel Discussion (Misc queries) 4 February 18th 06 04:30 AM
Accessing values in points collection of chart & conditional display nnj Charts and Charting in Excel 1 August 3rd 05 10:29 PM
Problem Assigning Macros Rafe Excel Worksheet Functions 2 June 17th 05 06:40 PM
Compare Listbox values with Collection values Stuart[_5_] Excel Programming 2 September 20th 03 01:58 PM


All times are GMT +1. The time now is 01:11 AM.

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

About Us

"It's about Microsoft Excel"