Hi All
I am trying to use the AddItem to create a List from a named Range. But when I run the form I am getting Compile Error: Method or Data Member not Found.
I have this code running successfully in another spreadsheet fine.
I am using excel 2010 and the spread was originally setup in Excel 2003
Private Sub UserForm_Initialize()
Dim ListItems As Variant, i As Integer
Class.Value = ""
Class_Name.Value = ""
Entry_Fee.Value = ""
With Me.Day
.Clear
ListItems = Range("HacksPoniesDays").Value
ListItems = Application.WorksheetFunction.Transpose(ListItems)
For i = 1 To UBound(ListItems)
.AddItem ListItems(i)
Next i
.ListIndex = -1
End With
With Me.Prize_List
.Clear
ListItems = Range("Hacksprize").Value
ListItems = Application.WorksheetFunction.Transpose(ListItems)
For i = 1 To Unbound(ListItems)
.AddItem ListItems(i)
Next i
.ListIndex = -1
End With
Day.SetFocus
End Sub
Any help thanks
Tony
Bookmarks