+ Reply to Thread
Results 1 to 12 of 12

Refresh userform periodically

  1. #1
    Valued Forum Contributor Macdave_19's Avatar
    Join Date
    03-14-2007
    Location
    Birmingham, England
    MS-Off Ver
    12.0
    Posts
    808

    Question Refresh userform periodically

    Hi everyone,

    I was wondering how i could refresh a userform every every 3 seconds or so?

    I'm using
    Please Login or Register  to view this content.
    within the userform_activate module?

    am i pi55in in the wind with that one?

    Cheers
    Mr MaGoo
    Magoo.Inc MMVII

    If i've helped please add to my Rep by Clicking on the Blue Scales in the top right hand corner of the post

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Refresh userform periodically

    Hey Magoo, nice 1337.

    I worry about your eyesight and a userform model or not model. It always happen to me that when a userform is showing, I can't do much else but work on it. If you do a refresh, is it because something on the sheet is changing? I don't think that can happen while the userform is displayed. I may be wrong with a modeless userform.

    Look at the section in http://www.tushar-mehta.com/publish_...rinterface.htm titled A userform design model for forms shown modeless It may help answer your question.
    Last edited by MarvinP; 01-25-2012 at 01:37 PM.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Valued Forum Contributor Macdave_19's Avatar
    Join Date
    03-14-2007
    Location
    Birmingham, England
    MS-Off Ver
    12.0
    Posts
    808

    Re: Refresh userform periodically

    Hi Marv,

    OK bit confused lol, Whats a 1337? also why the eyesight ref?

    Anyway back to the point , I have created a mini "Chat app" in a userform that works by sending the messages to a access DB and also reading from the DB. I need to refresh the form every so often to update any new messages.

    I have a refresh button that works fine but i would prefer not to have to refresh it manually.

    any ideas?

    not sure that link helped much buddy?

    Cheers

  4. #4
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Refresh userform periodically

    Is your form modal or modeless?
    Good luck.

  5. #5
    Valued Forum Contributor Macdave_19's Avatar
    Join Date
    03-14-2007
    Location
    Birmingham, England
    MS-Off Ver
    12.0
    Posts
    808

    Re: Refresh userform periodically

    answer: userform1.show 0

  6. #6
    Valued Forum Contributor Macdave_19's Avatar
    Join Date
    03-14-2007
    Location
    Birmingham, England
    MS-Off Ver
    12.0
    Posts
    808

    Re: Refresh userform periodically

    Bump?! any ideas folks?

  7. #7
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Refresh userform periodically

    You could use something akin to this

    In a normal module
    Please Login or Register  to view this content.
    Userform code:
    Please Login or Register  to view this content.

  8. #8
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Refresh userform periodically

    Why don't you use the double_click event or any other event to refresh the data ?
    You didn't mention any periodicity in refreshing.



  9. #9
    Valued Forum Contributor Macdave_19's Avatar
    Join Date
    03-14-2007
    Location
    Birmingham, England
    MS-Off Ver
    12.0
    Posts
    808

    Re: Refresh userform periodically

    I don't want the user to have to refresh it that's why mate

  10. #10
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Refresh userform periodically

    keep it simple

    In the useform:

    Please Login or Register  to view this content.
    In the 'thisworkbook' module
    Please Login or Register  to view this content.
    Replace 'MsgBox "cccc"' by your refreshing code, 'mate'.
    Last edited by snb; 01-27-2012 at 03:35 AM.

  11. #11
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Refresh userform periodically

    Hi Mr. Magoo,
    OK bit confused lol, Whats a 1337? also why the eyesight ref?
    1. You wrote pi55ed-off which uses numbers for similar shaped letters. This is called LEET spelling or 1337 converted.
    2. Mr Magoo was one of my favorite cartoon, the blind old guy, along with Marvin the Martian.

    I see that others have jumped into the answer. I'll read what they say in a minute after my very early morning coffee. (It's 5 am here!)

  12. #12
    Registered User
    Join Date
    08-22-2013
    Location
    Venlo, Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Refresh userform periodically

    Hi There,

    did you get your question solved ? as i'm also facing the same question (automatically refresh the userform every x sec.0.)

    Thanks

+ 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