+ Reply to Thread
Results 1 to 6 of 6

VBModeless question

  1. #1
    Registered User
    Join Date
    03-26-2015
    Location
    wisconsin, united states
    MS-Off Ver
    2010
    Posts
    47

    Question VBModeless question

    I have an InfoForm that I would like to display while code is loading, but that also prevents data from being changed in the excel spreadsheet itself.

    The below code does handle the first part, but it does not prevent data from being entered into excel.
    If anyone has a simple, efficient solution...please assist. Thanks.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: VBModeless question

    Remove the 'vbModeless' That does not affect the code loading. The thing that is affected by a modal userform is the user interface with Excel. The only code affected is the code which loads the userform, and it will stop until the form is closed.
    Last edited by JLGWhiz; 03-08-2018 at 09:14 PM.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

  3. #3
    Registered User
    Join Date
    03-26-2015
    Location
    wisconsin, united states
    MS-Off Ver
    2010
    Posts
    47
    In my case I was attempting to use it as a quick fix progress display. So I am looking for the code that calls the userform to continue to run while excel is locked to the user. Any other suggestions.

  4. #4
    Registered User
    Join Date
    03-26-2015
    Location
    wisconsin, united states
    MS-Off Ver
    2010
    Posts
    47
    Realizing now though I could take your suggestion then call the code from inside the modal userform progress bar...thanks

  5. #5
    Valued Forum Contributor Maudibe's Avatar
    Join Date
    12-21-2016
    Location
    USA
    MS-Off Ver
    2010-2013
    Posts
    326

    Re: VBModeless question

    mbrandt,

    Keep the ShowModal property set to True and initiate your code from the InfoForm_Activate. The form will display and lock excel while your modular code is initiated in the background.

    Please Login or Register  to view this content.
    HTH,
    Maud

  6. #6
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: VBModeless question

    Hi,

    You might also use
    Please Login or Register  to view this content.
    to prevent users from doing anything while your code is running.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Userform vbmodeless
    By zplugger in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-15-2015, 02:17 PM
  2. vbModeless Error
    By shiftyspina in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-22-2014, 10:18 AM
  3. Faux MsgBox as vbModeless
    By MisterPan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-28-2014, 09:15 AM
  4. How does the "vbModeless" in "UserForm.show vbModeless" work?
    By aijp in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 11-13-2013, 07:43 PM
  5. vbModeless form problem?
    By tom_19 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-25-2011, 05:41 PM
  6. [SOLVED] vbModeless Question
    By MWS in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-07-2006, 05:00 PM
  7. Help with vbModeless
    By systematic in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-18-2005, 07:35 PM

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