UserForm not hiding

T

Tony Bender

I have an application where the user opens an excel file, then clicks
an OptionButton that opens a UserForm. This UserForm (UF1) is a
report selection menu comprised of a MultiPage control with 7 pages.
The user selects a specific page and then has an assortment of
OptionButtons from which they can make their report selection. Once
the desired report is selected the UF1 'hides' and the appropriate
..xls file opens. When the user is done viewing or printing the
report they hit an exit CommandButton that closes the active workbook,
and returns them to the UF1. This works smoothly with one exception;
one of the reports (PEI.xls) when selected opens the file and then
also opens another UserForm (UF3)which appears on top of and to the
right side of the report. From this UF3 they make another selection
from a series of ComboBoxes. Once the selection is made the UF3
'hides' and the user views the PEI.xls. Again, no problems yet,
provided this is the first report the users selects. If however the
user selects any other report first, and then subsequently selects
this PEI.xls report, for whatever reasons the UF1 remains open and
visible, with the UF3 on top of it. How can this be, the UF1 hides
when a spefic report selection is first, but if it is not the first
selection the UF1 remains visible.

It is not a big problem, as the user can still make their selection,
and both UF1&UF2 will disappear, and the appropriate file opens. It
is just an annoyance and a mystery I'd like to solve.



TIA

Tony
 
T

Tony Bender

Dick,

Here is the code that gets the report and hides the menu UserForm1:

Private Sub OptionButton28_Click()
'Gets the Promotion Efficiency matrix & profitability tool

UserForm1.Hide
Workbooks.Open Filename:="H:\Locker Room Demo CD\Custom\PB_PEI_Matrix.xls"

End Sub

Then I have an auto_open macro for this file that opens UserForm3

Sub auto_open()
Sheets("report").Select
Range("a1").Select
Application.ScreenUpdating = False
ActiveWindow.DisplayWorkbookTabs = False
Application.DisplayFormulaBar = False
Application.DisplayStatusBar = False
UserForm3.Show
Application.ScreenUpdating = False

End Sub

I appreciate your help.
 
D

Dick Kusleika

Tony

Ok, not much there to go wrong. What version are you using? I'm going to
try to reproduce the weirdness.
 
T

Tony Bender

Dick,

I'm using Excel 2000, (9.0.4402 SR-1)

Dick Kusleika said:
Tony

Ok, not much there to go wrong. What version are you using? I'm going to
try to reproduce the weirdness.
 
D

Dick Kusleika

Tony

I couldn't reproduce it. Sorry. Feel free to email me the workbooks if you
like.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top