Thank you for your suggestions, I took your advice and made the changes - but I still get the same results.
I've burned too much time trying to figure this out so I simply put in a button which prompts the user to click to return to the menu (UF1). Thank you again for taking the time to repspond. Tony Bender On Oct 8, 5:03 am, Paul Schreiner <schreiner_p...@att.net> wrote: > You should set a breakpoint and > try to step through your macro to see what's going on. > > Which file has the ExitApp macro? > Is it in the Rpt1.xls file? > > If it is, then once the activework.close line is executed, > the UF1.Show line is no longer there to execute! > > also, > Once the Rpt1.xls file closes, Excel simply sets the focus > to the last active workbook. > You're not "opening" the workbook again, it was already open. > You're "activating" it. > > so, try using the Activate event instead of the open event. > > Private Sub Workbook_Activate() > Load UF1 > UF1.Show vbModeless > End Sub > > Paul > > > I have an application consisting of a report menu and the > corresponding templates the menu points to. > > The menu is a UserForm (UF1) and resides on a separate workbook > (Wkbk1). When the user opens Wkbk1 it automatically opens the > UserForm (UF1).. The > user then selects a report template from one of 4 OptionButtons. The > resulting template (example; Rpt1.xls) opens up. The user can exit > this report by clicking on the Exit button (triggers the ExitApp > macro > which closes the activewindow). > > Here is the ExitApp macro: > Private Sub ExitApp() > Application.DisplayAlerts = False > Application.ActiveWorkbook.Saved = False > Application.ActiveWorkbook.Close > UF1.Show > End Sub > > My problem is when I click on the Exit button on Rpt1 it closes the > workbook but instead of opening the menu (UF1) it simply opens > the sole empty worksheet in Wkbk1. I want this to automatically open > the UF1 instead of displaying the empty worksheet. > > I've tried the following code but with no luck, and I appreciate any > ideas as I am losing patience! > > In Wkbk1 I have this code: > > Private Sub Workbook_Open() > Load UF1 > UF1.Show vbModeless > End Sub > > Also, in the UserForm itself when the user selects one of the 4 > OptionButtons here is the corresponding code: > > Private Sub OB1_Click() > Workbooks.Open Filename:="C:\Data\Rpt1.xls" > UF1.Hide > End Sub > > Thank you, > > ________________________________ > > From: Tony Bender <tony_ben...@yahoo.com> > To: MS EXCEL AND VBA MACROS <excel-macros@googlegroups.com> > Sent: Wednesday, October 7, 2009 12:03:50 PM > Subject: $$Excel-Macros$$ Problems re-opening userform --~--~---------~--~----~------------~-------~--~----~ ---------------------------------------------------------------------------------- Some important links for excel users: 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at http://www.excelitems.com 2. Excel tutorials at http://www.excel-macros.blogspot.com 3. Learn VBA Macros at http://www.vbamacros.blogspot.com 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com If you find any spam message in the group, please send an email to: Ayush Jain @ jainayus...@gmail.com or Ashish Jain @ 26may.1...@gmail.com <><><><><><><><><><><><><><><><><><><><><><> HELP US GROW !! We reach over 6,500 subscribers worldwide and receive many nice notes about the learning and support from the group. Our goal is to have 10,000 subscribers by the end of 2009. Let friends and co-workers know they can subscribe to group at http://groups.google.com/group/excel-macros/subscribe -~----------~----~----~----~------~----~------~--~---