+ Reply to Thread
Results 1 to 2 of 2

userform freezes

  1. #1
    flow23
    Guest

    userform freezes

    first time creating a user form.

    BAsically 3 buttons to execute macros.

    Private Sub CommandButton1_Click()
    data
    form.hide
    End Sub

    Private Sub CommandButton2_Click()
    Print1
    form.hide

    End Sub

    Private Sub CommandButton3_Click()
    ActiveWorkbook.Close
    form.hide

    End Sub

    Private Sub CommandButton4_Click()

    Print2
    fom.hide
    End Sub

    however when I click the first buttion.. it doesnt execute the macro.

    2nd and 3rd button are ok.
    but it freezes

    and exit is perfect



  2. #2
    Forum Contributor keithl816's Avatar
    Join Date
    03-18-2005
    Location
    Georgia
    MS-Off Ver
    2000
    Posts
    188
    Hi flow23,

    Are you opening the form through a command button on a spreadsheet? If so put this in your code for the commandbutton.

    Please Login or Register  to view this content.
    Change userform number to number you are currently using.

    To open a sheet that is hidden, from a commandbutton in the userform place code like this in the appropriate command button.

    Please Login or Register  to view this content.

    To print the sheet put code like this in your userform for Commandbutton2. Change Sheet # to sheet you are currently using.

    Please Login or Register  to view this content.
    To close the userform with a command button use code like this for commandbutton3.


    Please Login or Register  to view this content.




    hope this helps,

    Larry
    Last edited by keithl816; 11-24-2005 at 01:34 PM.

+ 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