+ Reply to Thread
Results 1 to 5 of 5

Form Buttons Not Working

Hybrid View

  1. #1
    Darrin Henshaw
    Guest

    Re: Form Buttons Not Working

    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 ***

  2. #2
    SS
    Guest

    Re: Form Buttons Not Working

    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 Before:=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 ***
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1