Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I rceive the information in my listbox

Status
Not open for further replies.

Joep1972

Technical User
Nov 24, 2002
13
NL
Hi,

Can somebody help me with linking a range of cells out of my worksheet "test" to my listbox1 in my userform1.

thx

Joep
 
userform1.listbox1.rowsource = sheets("test").range("A1:A10")

Rob
[flowerface]
 
Hello Rob,

I've got the following,

Private Sub CommandButton1_Click()
'
' Annuleerinvoerform1 Macro
' De macro is opgenomen op 25-11-2002 door Joep Spronck.
'

'
UserForm1.Hide

End Sub

Private Sub CommandButton3_Click()
Worksheets("Test").Cells(14, 8).Value = Me.TextBox1.Text
Sheets("test").Cells(14, 9) = Me.Calendar1.Day
Unload Me
End Sub

Private Sub ListBox1_Click()
UserForm1.ListBox1.RowSource = Sheets("test").Range("g14:g27")
End Sub

I don't get the information shown,

can you please help.

Joep
 
Put the .rowsource assignment in your

sub userform1_initialize()

it needs to be set just once, and left alone. Rob
[flowerface]
 
Oops - the rowsource property is actually text, so that you need:

UserForm1.ListBox1.RowSource = "test!g14:g27"

Sorry for the misinfo

Rob
[flowerface]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top