Is it better to show ProgressBar UserForms in VBA as modal or modeless?

前端 未结 5 730
闹比i
闹比i 2020-12-19 05:36

Is it better to show ProgressBar UserForms in VBA as modal or modeless? What are the best practices for developing progress indicators in VBA?

Modeless UserForms req

5条回答
  •  天涯浪人
    2020-12-19 05:43

    Actually you have following properties, resulting in pros/cons depending on your need:

    Type      | Impact on UI | Impact on caller execution
    ----------|--------------|-----------------------------
    Modal     | Blocked      | Blocked until Form is closed
    Modeless  | Not blocked  | Continues
    

    If you want to block the UI AND let the caller continue, then you need to open the Form in modal mode with Application.OnTime.

提交回复
热议问题