View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
kiat kiat is offline
external usenet poster
 
Posts: 34
Default Opening a UserForm

Sub Picture88_Click()
userform1.listbox1.rowsource = "203!A28:B44"
UserForm1.Show
End Sub

"Danny Sowden" wrote in message
...
I have created a UserForm in VBA for my Excel spreadsheet.
What is the correct code to assign to a macro to open up
the userform and then populate the ListBox1 the RowSource
with 203!A28:B44.

I have the code

Sub Picture88_Click()
UserForm1.Show
End Sub

Which opens the UserForm but i want to add the RowSource
into the ListBox1 when I call the UserForm, so that i can
assign different RowSources when i click different
pictures.