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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add to Form1 listbox from Module

Status
Not open for further replies.

Japskunk72

Programmer
Feb 19, 2003
64
US
I am having trouble trying to understand how I would add info to a listbox from a module. I keep thinking i can just type form1.listbox1.items.add(string). it aint work'n??? there is no form1.listbox1. I tryed to create a function from within the form called
Public Function AddtoListbox(stuff as string)
listbox1.items.add(stuff)
end Function

When i try to call it from the module it doesnt see that either?
Thanks 4 n e help
JT
 
Could you pass the listbox by reference to the module function or sub?

In the module,

public sub AddStuffToListbox (byref L as Listbox, byval Stuff as string)

Mark [openup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top