+ Reply to Thread
Results 1 to 12 of 12

Refresh Screen Display

  1. #1
    Forum Contributor
    Join Date
    01-07-2004
    Posts
    314

    Refresh Screen Display

    Hi all,

    Using Excel 2013 64-bit.

    How can I refresh the screen display at run-time to the user can see new sheets that have been added and possibly click on a cell if they choose to do so?
    The code I have tried so far does not update the display before offering the prompt so the user may choose a different cell

    Please Login or Register  to view this content.
    Full code below
    Thx
    w

    Please Login or Register  to view this content.
    Kind regards,
    w

    http://dataprose.org

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Refresh Screen Display

    MsgBox is modal; when dismissed, the code resumes running.

    You could instead use Application.InputBox with type:=8 to enable the user to select a cell.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Contributor
    Join Date
    01-07-2004
    Posts
    314

    Re: Refresh Screen Display

    Thanks shg,

    I guess I thought since all of the refresh stuff came before the MsgBox that the screen would update before the first msgbox
    I commented out the first msgbox - same result.

    I do have the Inputbox inside the Select Case of the msgbox.

    Any other ideas?
    thx
    w

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Refresh Screen Display

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    01-07-2004
    Posts
    314

    Re: Refresh Screen Display

    Thanks shg,

    Still not updating so that I may select a cell from the control worksheet.
    Revised code below in case I did not add your code correctly.

    thx
    w

    Please Login or Register  to view this content.
    The revised code below in case I did not add your code correctly

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Refresh Screen Display

    You need to turn screenupdating back on first.

  7. #7
    Forum Contributor
    Join Date
    01-07-2004
    Posts
    314

    Re: Refresh Screen Display

    Thanks shg,

    I thought some of the other methods would update the screen display?
    No matter, the screen display now updates - thanks.

    I took out the MsgBox and Do Loop because they seemed redundant, the InputBox seems to be enough.

    However I am receiving a Type Mismatch error at this line
    Please Login or Register  to view this content.
    In my test I chose, "Massachusetts Mutual Life Insurance" and during debugging that is the value of sCriteria.
    What could cuase this error?
    I get the same error message with or without the Redim statement which I feel is not needed in this case.

    thx
    w

    Full code:
    Please Login or Register  to view this content.

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Refresh Screen Display

    The Array function returns a Variant; it can't be assigned to string array, only a Variant.

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Refresh Screen Display

    Please Login or Register  to view this content.
    Last edited by shg; 05-27-2013 at 12:23 PM.

  10. #10
    Forum Contributor
    Join Date
    01-07-2004
    Posts
    314

    Re: Refresh Screen Display

    Thanks shg,

    Works great!
    Also learned a couple of new things from your code.

    Thanks
    w

  11. #11
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Refresh Screen Display

    You're welcome.

  12. #12
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Refresh Screen Display

    That should be ...

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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