+ Reply to Thread
Results 1 to 17 of 17

Opening and closing an InfoBox

  1. #1
    Registered User
    Join Date
    04-11-2013
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    92

    Opening and closing an InfoBox

    Hi Forum,

    Nice to be back and Happy New Year. I have a rather simple question that is humbling me:

    I have the following function which refreshes a series of Bloomberg data on my sheet, waits 4 seconds for the info to be loaded, and then call a function whose purpose is to transfer the downloaded data onto another sheet.

    Please Login or Register  to view this content.
    What I want is a way of displaying a textbos that will say: "Please wait while we retrieve your data". This textbox appears Inmediately before the RefreshEntireWorksheet, and should automatically close after the four seconds pause given for the values to update.

    I thought that maybe this cannot be done this way and it would be easier to open the text box in the function and then close it in the function BBGTransit. Anyhow, I donot know how to Open and close a text box ( I do not want the "OK" option from msgbox or inputbox)

    Thanks in advance

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Opening and closing an InfoBox


    Hi,

    you can use an UserForm with its ShowModal property to False

    Userform.Show to open it, Unload Userform to close it …

  3. #3
    Registered User
    Join Date
    04-11-2013
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    92

    Re: Opening and closing an InfoBox

    Could you provide an example please? Ive never used them before...

  4. #4
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Opening and closing an InfoBox


    You have to build the Userform first.

    A simplest way : use an empty cell to show the message …

  5. #5
    Registered User
    Join Date
    04-11-2013
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    92

    Re: Opening and closing an InfoBox

    I am not familiar with building userforms. Is there no other way?

  6. #6
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Opening and closing an InfoBox


    As written, use a cell …

  7. #7
    Registered User
    Join Date
    04-11-2013
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    92

    Re: Opening and closing an InfoBox

    I cant use a cell it will look like crap....Could you provide some example code on the userform?

  8. #8
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Opening and closing an InfoBox


    Read post #2 for the Userform code !

    And you can use the Advanced Search for other Userform example …
    Last edited by Marc L; 01-08-2014 at 11:09 AM.

  9. #9
    Registered User
    Join Date
    04-11-2013
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    92

    Re: Opening and closing an InfoBox

    I have now created the userform but using .show only displays it for a split second! How can I get it to stay on until my cells have updated? thanks

  10. #10
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Opening and closing an InfoBox


    Weird ‼ Mine stays in front until I close it …

    Depends on your code …

  11. #11
    Registered User
    Join Date
    04-11-2013
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    92

    Re: Opening and closing an InfoBox

    Sub Form()

    StandbyForm.Show

    Application.OnTime (Now + TimeValue("00:00:04")), "BYB"

    Unload StandbyForm

    End Sub


    Sub BYB()

    End Sub

  12. #12
    Registered User
    Join Date
    04-11-2013
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    92

    Re: Opening and closing an InfoBox

    Even in break mode it just flashes and instantly closes...

  13. #13
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Try this !

    Please Login or Register  to view this content.

  14. #14
    Registered User
    Join Date
    04-11-2013
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    92

    Re: Opening and closing an InfoBox

    Thanks it works well now but my links do not update during those four seconds...Is there any way thAT I can achieve this? Thanks

  15. #15
    Registered User
    Join Date
    04-11-2013
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    92

    Re: Opening and closing an InfoBox

    Hey dont worry I just solved it - one last question, how can I specify the area of the screen on which the userform pops up? Its showing itself in the bottomright corner for some weird reason/. Thanks

  16. #16
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Opening and closing an InfoBox


    In its Properties window, see StartUpPosition, Left & Top

  17. #17
    Registered User
    Join Date
    04-11-2013
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    92

    Re: Opening and closing an InfoBox

    And solved it too. Many thanks mate!

+ 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. [SOLVED] Help with opening and closing workbooks
    By LaffyAffy13 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-10-2013, 10:55 AM
  2. Opening, Closing, and Opening Excel workbooks from MS Project
    By m007schneider in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-04-2013, 03:22 PM
  3. Opening and closing one workbook after another
    By Nancy123 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-21-2010, 08:37 AM
  4. Opening one book and closing another
    By natsuki-chan in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-16-2010, 08:14 AM
  5. Opening/closing Excel
    By Bart van der Ve in forum Excel General
    Replies: 0
    Last Post: 06-12-2007, 12:18 PM

Tags for this Thread

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