Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Jun 2003
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Form focus (Office 97)

    My spreadsheet opens with a menu form but my users want to be able to access toolbar items
    Is there a way to use a menu bar item without having to close the form first
    for example if the form is displayed and a user wants to Print (which is not on the UserForm - I know it could be) they have to click a button to close the form to make the menubar items acessable

  2. #2
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Dallas, Texas, USA
    Posts
    1,680
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Form focus (Office 97)

    This excerpt from one of Walkenbach's books may help. But please note - the book I use was written for Excel2000. I noticed that you're using 97. I really can't say if this info will work for 97 - you may want to wait for someone else to chime in...
    <hr>In Excel 2000, a UserForm can be modeless. This means that the user doesn't have to dismiss the UserForm before activating the workbook and doing other work in Excel. The <font color=blue>Show</font color=blue> method of the UserForm object defaults to displaying a modal form, meaning that the rest of Excel is suspended while the UserForm is visible. To display a modeless UserForm, use an instruction such as this:

    UserForm1.Show vbModeless

    The word <font color=blue>vbModeless</font color=blue> is a built-in constant that has a value of <font color=blue>0</font color=blue>. Therefore, the effect of the following statement is identical to that of the preceeding statement:

    UserForm1.Show 0
    <hr>
    - Ricky

  3. #3
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Form focus (Office 97)

    In addition to suggestions of modeless form that others provided:

    If there were not a lot of toolbar items that the user might want to access, you could just create buttons to call the items from the userform. Add a "Print" button, or a "print preview" or any other items they might want.

    If their is no room on the form, just add one button to call a new user form which contains all the supplemental menu items.

    another idea is to make your menu a new toolbar (if it only contains commands) instead a user form, and they can use these toolbars and the "normal" toolbars.

    Steve

    Steve

  4. #4
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Form focus (Office 97)

    <P ID="edit" class=small>(Edited by Leif on 13-Mar-04 16:33. to update link to http://www.bmsltd.ie/)</P>Excel only started supporting modeless forms with XL2K. But, thanks to a bug in XL97, it actually can be done, but it's not a good idea. There is a link to ModelessForm.zip on Stephen Bullen's Excel Page that shows how it can be done. I actually think that I delivered code like this to a customer who has never complained, so maybe it is safe. <img src=/S/crossfingers.gif border=0 alt=crossfingers width=17 height=16> HTH --Sam
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

Posting Permissions

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