+ Reply to Thread
Results 1 to 5 of 5

Form Buttons Not Working

Hybrid View

  1. #1
    SS
    Guest

    Form Buttons Not Working

    I have a form that will appear when my ecel file is opened. When one of the
    command buttons is select, the form is hidden, a series of code is processed,
    and the form is to reappear.

    What actually happens is that the form reappears as it is supposed to, but
    none of the buttons will respond to being selected.

    I have tried to unload and load the form, with no success. Does anyone know
    why the program is not jumping out of the module and back to letting the form
    have control?

    Thanks

    SS

  2. #2
    Tom Ogilvy
    Guest

    Re: Form Buttons Not Working

    You should probably hide the form rather than unload it.

    Me.hide rather than unload me

    --
    Regards,
    Tom Ogilvy


    "SS" <SS@discussions.microsoft.com> wrote in message
    news:85110291-278F-4F4B-9F06-46F9E1401F7A@microsoft.com...
    > I have a form that will appear when my ecel file is opened. When one of

    the
    > command buttons is select, the form is hidden, a series of code is

    processed,
    > and the form is to reappear.
    >
    > What actually happens is that the form reappears as it is supposed to, but
    > none of the buttons will respond to being selected.
    >
    > I have tried to unload and load the form, with no success. Does anyone

    know
    > why the program is not jumping out of the module and back to letting the

    form
    > have control?
    >
    > Thanks
    >
    > SS




  3. #3
    SS
    Guest

    Re: Form Buttons Not Working

    I have tried to "hide" and "show" and that does not work. The form will be
    shown again, but none of the buttons work on it. You cannot even terminate
    the form at that point.



    "Tom Ogilvy" wrote:

    > You should probably hide the form rather than unload it.
    >
    > Me.hide rather than unload me
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    >
    > "SS" <SS@discussions.microsoft.com> wrote in message
    > news:85110291-278F-4F4B-9F06-46F9E1401F7A@microsoft.com...
    > > I have a form that will appear when my ecel file is opened. When one of

    > the
    > > command buttons is select, the form is hidden, a series of code is

    > processed,
    > > and the form is to reappear.
    > >
    > > What actually happens is that the form reappears as it is supposed to, but
    > > none of the buttons will respond to being selected.
    > >
    > > I have tried to unload and load the form, with no success. Does anyone

    > know
    > > why the program is not jumping out of the module and back to letting the

    > form
    > > have control?
    > >
    > > Thanks
    > >
    > > SS

    >
    >
    >


  4. #4
    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 ***

  5. #5
    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