Load Data into Userform ListBox

J

jfcby

What am I doing wrong? Does loading data into a listbox require a lot
of code? If so I missing something because I've been working on this
for 4 hours now and it's still not working. Can someone provide a
simple working example and resource for me to learn how to work with
userforms. Excel examples and this forum examples have not been
helpful.

Private Sub UserForm_Initialize()
ListBox1.ColumnCount = 1
ListBox1.AddItem = "1"
ListBox1.AddItem = "2"
End Sub

Thank you for your help,
Frankie
 
J

jfcby

What am I doing wrong? Does loading data into a listbox require a lot
of  code? If so I missing something because I've been working on this
for 4 hours now and it's still not working. Can someone provide a
simple working example and resource for me to learn how to work with
userforms. Excel examples and this forum examples have not been
helpful.

Private Sub UserForm_Initialize()
    ListBox1.ColumnCount = 1
    ListBox1.AddItem = "1"
    ListBox1.AddItem = "2"
End Sub

Thank you for your help,
Frankie

Problem Solved by removing the =

jfcby
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top