Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 8 of 8

Thread: question about UserForm initialization

  1. #1
    Board Regular
    Join Date
    Feb 2002
    Location
    Singapore
    Posts
    77
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    When UserForm is modal, user must respond to it first. But how about read some data and write them to some cell in the Workbook which contains the UserForm?

  2. #2
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi Andrew

    I am a bit confused by your statement:
    "When UserForm is modal, user must respond to it first"
    What do you mean by that? If a UserForm is Modal (True) the user cannot shift focus back to the Excel Worsheet. In Excel 2000 UserForms now have the ShowModal Property, which by default is True. If this is set to False, Focus can be toggled between the UserForm, it's Controls and also the the Excel Interface, eg Worksheets toolbars etc. What this basically means is, unless you are using Excel 2000 + the UserForm can only be shown as Modal.





    _________________
    Kind Regards
    Dave Hawley
    OzGrid Business Applications
    Microsoft Excel/VBA Training


    [ This Message was edited by: Dave Hawley on 2002-03-16 02:42 ]

  3. #3
    Board Regular
    Join Date
    Feb 2002
    Location
    Singapore
    Posts
    77
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thx u, Dave. I didn't know that we can let the UserForms Non-Modal. , so made a mistake in my question. I feel Non-Modal UserForms should be better for users and programmers. Why Modal?

  4. #4
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi Andrew


    I half agree with "better for users and programmers". I rarely use the new ability in Excel 2000 as it can (and does) open another base you have to cover. It's bad enough now





  5. #5
    MrExcel MVP Mark O'Brien's Avatar
    Join Date
    Feb 2002
    Location
    Columbus, OH, USA
    Posts
    3,530
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    You can actually make Excel 97 userforms "modeless" as well. Although it's not really a feature and is more of an exploitation of a bug. I have to use it when a client was desparate for modeless userforms. I agree though, they are a complete pain.

  6. #6
    Board Regular
    Join Date
    Feb 2002
    Location
    Singapore
    Posts
    77
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Dave and Mark, but how to make a userform non-modal in Excel 2000 VBA ? badly need that. I have tried to put Userform1.showModal=False into Auto_Run().
    Thx!

    regards
    Andrew XJ

  7. #7
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi Andrew

    You do this at 'design-time' while in the VBE. Just select your UserForm and then change the "ShowModal" (in the Properties Window) to False.

    The ShowModal Property is read only at Run-time!

    _________________
    Kind Regards
    Dave Hawley
    OzGrid Business Applications
    Microsoft Excel/VBA Training


    [ This Message was edited by: Dave Hawley on 2002-03-25 01:19 ]

  8. #8
    Board Regular
    Join Date
    Feb 2002
    Location
    Singapore
    Posts
    77
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thx!

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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