JoeEk Posted January 20, 2004 Posted January 20, 2004 I'm very new to .NET, and i'm trying to access a listbox on my main form within my Functions/Subs but I can't.. Any help is apreciated Quote
Administrators PlausiblyDamp Posted January 20, 2004 Administrators Posted January 20, 2004 Could you post any code you have so far? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
JoeEk Posted January 20, 2004 Author Posted January 20, 2004 I have no code currently, i'm just trying to access listbox1 from my module Quote
JoeEk Posted January 20, 2004 Author Posted January 20, 2004 Module Module1 Public Function GetItem() As String GetItem = ListBox1.Items.Item(0) End Function End Module Quote
FartNocker Posted January 20, 2004 Posted January 20, 2004 Module Module1 Public Function GetItem(ByVal FormMain As YourFormsRealNameHere) As String GetItem = FormMain.ListBox1.Items.Item(0) End Function End Module 'Call the function like this Call GetItem(me) Mark Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.