|
-
Sep 16th, 2003, 01:17 AM
#1
Thread Starter
Member
Referencing forms from modules
I am trying to reference a listview, label and status bar from a module but cannot seem to get it to work. I have declared the form by saying dim frm as form1. This then errors everytime I reference my form. If I declare the form as a new form: dim frm as new form1, when I then say frm.show, it loops and loops around doing nothing. Any ideas?
-
Sep 16th, 2003, 01:27 AM
#2
Addicted Member
Well, first of all, could you be more specific as to what you are trying to do? What exactly do you mean by referencing the listbox?
To stop the looping, use frm.showdialog() instead of .show()
Take my love
Take my land
Take me where I cannot stand
I don't care, I'm still free
You can't take the sky from me...
-
Sep 16th, 2003, 01:34 AM
#3
Thread Starter
Member
Sorry, I should have been more specific. It is acutally a listview. I am adding items into the listview from a module and then trying to show the form. I have tried your suggesting but that does not seem to work.
-
Sep 16th, 2003, 01:44 AM
#4
Addicted Member
Ah. Listview...hmm. I don't know anything about listboxes. Shooting blindly here, but could you not do much of what you are trying to do in the load() event for the new form instead of from the module?
Another shot in the dark: Could you populate an array in the module, load the array data into a variable, then pass that variable into the new form?
I would guess that the looping problem is unrelated to the listview thing, but again, just a guess.
Take my love
Take my land
Take me where I cannot stand
I don't care, I'm still free
You can't take the sky from me...
-
Sep 16th, 2003, 09:54 AM
#5
mbjunior99 try posting your code and it will be easier to help you.
-
Sep 16th, 2003, 07:38 PM
#6
Thread Starter
Member
Thanks for your help. I have put everything under the form and it is now working a treat.
-
Sep 17th, 2003, 12:52 AM
#7
Addicted Member
Excellent! I'm glad to be of assistance. It makes up for all the times someone has had to help me.
Take my love
Take my land
Take me where I cannot stand
I don't care, I'm still free
You can't take the sky from me...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|