Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub UserForm_Terminate()
frmReport.Hide Call RecoverFromError End Sub Sub RecoverFromError() Workbooks("Work Order Master File").Activate Workbooks.Open FileName:= _ "C:\Documents and Settings\" & UserName & "\My Documents\Work Order Error File.xls" Application.DisplayAlerts = False Workbooks("Work Order Error File").Sheets(Array("Master List", "Drum Prep", "Acids", "Solvents", "Top 5 Items", _ "Master Unscheduled List", "Search Criteria", "Test", "Acids PM's", "Solvents PM's" _ )).Select Sheets("Acids").Activate Sheets(Array("Master List", "Drum Prep", "Acids", "Solvents", "Top 5 Items", _ "Master Unscheduled List", "Search Criteria", "Test", "Acids PM's", "Solvents PM's" _ )).Copy Sheets(Array("Master List", "Drum Prep", "Acids", "Solvents", "Top 5 Items", _ "Master Unscheduled List", "Search Criteria", "Test", "Acids PM's", "Solvents PM's" _ )).Move Befo=Workbooks("Work Order Master File").Sheets(1) Workbooks("Work Order Master File").Sheets(Array("Master List", "Drum Prep", "Acids", "Solvents", "Top 5 Items", _ "Master Unscheduled List", "Search Criteria", "Test", "Acids PM's", "Solvents PM's" _ )).Select ActiveWindow.SelectedSheets.Delete Sheets("Master List (2)").Name = "Master List" Sheets("Drum Prep (2)").Name = "Drum Prep" Sheets("Acids (2)").Name = "Acids" Sheets("Solvents (2)").Name = "Solvents" Sheets("Top 5 Items (2)").Name = "Top 5 Items" Sheets("Master Unscheduled List (2)").Name = "Master Unscheduled List" Sheets("Search Criteria (2)").Name = "Search Criteria" Sheets("Test (2)").Name = "Test" Sheets("Acids PM's (2)").Name = "Acids PM's" Sheets("Solvents PM's (2)").Name = "Solvents PM's" Application.DisplayAlerts = True Workbooks("Work Order Error File").Close Workbooks("Work Order Master File").Activate frmReport.Show End Sub It seems to get hung up on the "frmReport.Show" command and does not give control to the form. Any suggestions would be wonderful. I have been beating my head into a wall trying to figure out what tiny little thing I am missing to make this work. Thanks SS "Darrin Henshaw" wrote: What is the code behind the command button that hides it? I admit I'm not a expert like Tom, but it seems that excel might be waiting on something before, giving control back. *** Sent via Developersdex http://www.developersdex.com *** |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Form Buttons | Excel Discussion (Misc queries) | |||
Form buttons vs. ActiveX Buttons | Excel Discussion (Misc queries) | |||
Form buttons | Excel Worksheet Functions | |||
form/subform with buttons | Excel Worksheet Functions | |||
Form buttons and macros | Excel Programming |