tfurnivall
New Member
- Joined
- Jan 15, 2012
- Messages
- 48
I have a small system with three forms. Form can call Form2 (via a listbox) or Form 3 (via a command button); form 2 can call form 3(via a command button).
When I load the listbox in form1, and click on one of the entries, I pass that entry to form 2 for a more detailed display. Form 2 has an exit button which returns me to form 1 (via Me.hide)
The initial load of Form1 does what I want - loads values into the listbox, and when I clock on one, loads the entry into Form2. When I click the Exit button in Form2, I return to Form1, go through the load procedure, but the listbox contents do not display. They ARE being loaded, but are not visible (the control itself IS visible - just no data values).
I'm stumped - there must be a way to use multiple forms calling each other like this. How do I make it work?
Tony
============
\
The (very abstracted code) is like this:
sub form1_activate
LoadListBoxWith Values
me.show
end sub
sub form1.lstListBox_*******
Load Form2
ThisWorkbook LoadForm2Data Form1SelectedEntry
Form2.show
' Now we are returning from Form2
Unload Form2
me.show
end sub
sub form2.cmdExit_click
Me.hide
end sub
I can post the real code if that would be more useful, but there's several nundred lines over three forms and about three extra modules...
When I load the listbox in form1, and click on one of the entries, I pass that entry to form 2 for a more detailed display. Form 2 has an exit button which returns me to form 1 (via Me.hide)
The initial load of Form1 does what I want - loads values into the listbox, and when I clock on one, loads the entry into Form2. When I click the Exit button in Form2, I return to Form1, go through the load procedure, but the listbox contents do not display. They ARE being loaded, but are not visible (the control itself IS visible - just no data values).
I'm stumped - there must be a way to use multiple forms calling each other like this. How do I make it work?
Tony
============
\
The (very abstracted code) is like this:
sub form1_activate
LoadListBoxWith Values
me.show
end sub
sub form1.lstListBox_*******
Load Form2
ThisWorkbook LoadForm2Data Form1SelectedEntry
Form2.show
' Now we are returning from Form2
Unload Form2
me.show
end sub
sub form2.cmdExit_click
Me.hide
end sub
I can post the real code if that would be more useful, but there's several nundred lines over three forms and about three extra modules...