Consulting

Results 1 to 4 of 4

Thread: refreshing sheet "under" modally shown useform

  1. #1
    VBAX Regular
    Joined
    Apr 2018
    Posts
    25
    Location

    refreshing sheet "under" modally shown useform

    Hi,

    i have a modally shown userform. One of things it does is modifying cells in active sheet.
    The changes are however not visible until i close it - even though application.screenupdating = on

    Is there a way to see changes instantly?

    - doEvents does not help
    - showing uf modeless is not an option

    thanks

  2. #2
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,724
    Location
    You didn't say how or how many cells it modifies

    This seems to update the sheet as you type


    Option Explicit
    
    
    Private Sub TextBox1_Change()
        ActiveSheet.Range("A1") = Me.TextBox1.Text
    End Sub
    Attached Files Attached Files
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  3. #3
    VBAX Regular
    Joined
    Apr 2018
    Posts
    25
    Location
    Ok, thank you for your help good sir, it is really that simple.
    I simply had screenupdating = false, contrary to what i thought and was looking for some insane explanations of this phenomenon.
    Last edited by mg25683; 06-02-2020 at 11:30 AM.

  4. #4
    You can set the ControlSource of the TextBox to A1 then changes made to A1 will reflect in the TextBox, likewise changes made to the TextBox will change A1
    Hope that helps.
    Get the free Excel based Toolbar or click here for free examples & Excel Consultancy

    RoyUK

Posting Permissions

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