+ Reply to Thread
Results 1 to 5 of 5

UserForm

  1. #1
    Steve
    Guest

    UserForm

    I have a UserForm with a drop box. The drop box has all of the worksheets in
    the workbook, so when the user clicks the worksheet name, it will become the
    active workbook on the screen. So far, so good.

    After I drop down the drop box and select the worksheet name, I want the
    active worksheet to have the focus, not the userform. However, the cursor
    stays in the drop box and I have to manually click in the worksheet to get
    the focus there. I have used ActiveSheet.Select, but the focus stays with
    the userform drop box.

    Any ideas.

    Thanks,


  2. #2
    drhalter
    Guest

    RE: UserForm

    Steve,

    I think what you are looking for is the following command.

    UserForm1.Hide

    Add this at the point you want your sheet to become active, and you should
    have no problem. Note that this command hides the form, but the form is
    still running. You can then either show the form again (UserForm1.Show) or
    end the form's operation (Unload UserForm1).

    Dave

    "Steve" wrote:

    > I have a UserForm with a drop box. The drop box has all of the worksheets in
    > the workbook, so when the user clicks the worksheet name, it will become the
    > active workbook on the screen. So far, so good.
    >
    > After I drop down the drop box and select the worksheet name, I want the
    > active worksheet to have the focus, not the userform. However, the cursor
    > stays in the drop box and I have to manually click in the worksheet to get
    > the focus there. I have used ActiveSheet.Select, but the focus stays with
    > the userform drop box.
    >
    > Any ideas.
    >
    > Thanks,
    >


  3. #3
    Steve
    Guest

    RE: UserForm

    Thanks Dave.

    I don't really want to hide the form, rather use it as a "toolbar" so that
    the users can continue to use the drop box to get to different tabs. I just
    want them to select a tab from the form, have that tab become the active
    sheet, and have the focus be set to the sheet in the current cell. I want
    the user form to stay open and available, but the cursor to be in the
    spreadsheet. Make any sense?


    "drhalter" wrote:

    > Steve,
    >
    > I think what you are looking for is the following command.
    >
    > UserForm1.Hide
    >
    > Add this at the point you want your sheet to become active, and you should
    > have no problem. Note that this command hides the form, but the form is
    > still running. You can then either show the form again (UserForm1.Show) or
    > end the form's operation (Unload UserForm1).
    >
    > Dave
    >
    > "Steve" wrote:
    >
    > > I have a UserForm with a drop box. The drop box has all of the worksheets in
    > > the workbook, so when the user clicks the worksheet name, it will become the
    > > active workbook on the screen. So far, so good.
    > >
    > > After I drop down the drop box and select the worksheet name, I want the
    > > active worksheet to have the focus, not the userform. However, the cursor
    > > stays in the drop box and I have to manually click in the worksheet to get
    > > the focus there. I have used ActiveSheet.Select, but the focus stays with
    > > the userform drop box.
    > >
    > > Any ideas.
    > >
    > > Thanks,
    > >


  4. #4
    Registered User Ivan F Moala's Avatar
    Join Date
    10-25-2003
    Location
    Auckland, New Zealand
    Posts
    71
    something along these lines

    Please Login or Register  to view this content.
    Kind Regards,
    Ivan F Moala From the City of Sails
    \1

  5. #5
    Steve
    Guest

    Re: UserForm

    Ivan,

    Thank you, thank you. You have no idea how much this has helped. I can
    stop pulling my hair out!

    I greatly appreciate the help!

    "Ivan F Moala" wrote:

    >
    > something along these lines
    >
    >
    > Code:
    > --------------------
    >
    > Sheets(ComboBox1.Text).Activate
    > AppActivate "Microsoft Excel"
    >
    > --------------------
    >
    >
    > --
    > Ivan F Moala
    >
    >
    > ------------------------------------------------------------------------
    > Ivan F Moala's Profile: http://www.excelforum.com/member.php...fo&userid=1954
    > View this thread: http://www.excelforum.com/showthread...hreadid=387631
    >
    >


+ 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