Remove the cross in MSGBOX

Solved
duduleray -  
 duduleray -
Hello everyone, forum hello,

Configuration: Windows / Edge 18.18362
Under Windows 10 and Excel 2007 Fr

I display a small message "End of listing" with the code below, then the message automatically disappears after 3 seconds, so far so good.

I would like to remove the X in the top right corner of the MSGBOX so that it cannot be preemptively closed.

So I want to remove it and make the X inactive, and the message should disappear by itself after 3 seconds.

Thank you for your help, have a good afternoon.

I have seen tips on the web and tried them, but they don't work.

Best regards, duduleray


Sub Msgbox_01()
CreateObject("Wscript.shell").Popup "End of listing", 3, "Information message", vbInformation
End Sub

6 answers

  1. yg_be Posted messages 23437 Registration date   Status Contributor Last intervention   Ambassador 1 588
     
    Hello,
    can you clarify "basic" when you share VBA code?
    "It's not working": what's happening, do you have an error message?
    1
  2. f894009 Posted messages 17417 Registration date   Status Member Last intervention   1 717
     
    Hello,

    To avoid the cross, you need at least two buttons

    Sub Msgbox_01()
    CreateObject("WScript.Shell").Popup "End of listing", 3, "Information message", vbYesNo + vbInformation
    End Sub
    But the buttons close the box

    I saw a site where a guy developed a DLL to avoid having a button, but you have to download the DLL and install it on each PC where the file will be

    A simple example with UserForm and Timer:
    https://mon-partage.fr/f/hPdkmbEI/
    1
  3. duduleray
     
    Hello yg_be,

    Thank you for your reply, I have selected "basic" and then pasted my piece of code between the two icons, but it's not working.

    I am on Windows 10 and official French Edge, I already removed Internet Explorer 11 because of this issue but it's still not working and I don't know why.

    That's it for that, otherwise I don't have any error messages since I don't have the code to fulfill my request.

    Thank you for your help, have a nice afternoon.

    Best regards, Duduleray
    0
  4. duduleray
     
    Hi f894009,

    Thank you for your response, that's nice.

    I tried your file which works almost

    I just modified the 3 seconds, I set it to 10 seconds to see
    but I don't see the countdown displayed in the USF
    and after 10 seconds the USF disappears

    I would really like to see the countdown if possible, I've seen that online
    it was a small bar graph in the center of a USF that moved according to the countdown time with the display counting down, like below roughly

    ||||||||||||||||||||||||||||||||||||||||||| remaining 05 s |||||||||||||||||||

    Thank you for your help, have a good evening

    Best regards, Duduleray
    0
    1. f894009 Posted messages 17417 Registration date   Status Member Last intervention   1 717
       
      Re,
      but I don't see the countdown displayed in the USF
      Not requested and not in your WScript example
      In "my" example, it's not possible with this code, but feasible with different code
      0
      1. duduleray > f894009 Posted messages 17417 Registration date   Status Member Last intervention  
         
        Good evening

        Thank you for the response,

        would it be possible to do that with a different code?
        Please could you do that for me, that would be very kind.

        Thank you in advance.

        Best regards, duduray
        0
      2. f894009 Posted messages 17417 Registration date   Status Member Last intervention   1 717 > duduleray
         
        Hello,

        Okay; I'll take a look at it.
        0
      3. duduleray > f894009 Posted messages 17417 Registration date   Status Member Last intervention  
         
        Hello,

        Thank you for your response,

        So I would like to display a message via a USF or MSGBOX with an adjustable auto-close timer without clicking on OK or a cross

        and if possible a small progress bar that decreases over time with a numerical display in the middle of the progress bar

        have a nice day and thank you

        Best regards, duduleray
        0
      4. f894009 Posted messages 17417 Registration date   Status Member Last intervention   1 717 > duduleray
         
        What will happen during the wait?
        0
  5. duduleray
     
    Hi,

    While waiting, I would just like to see the numerical countdown in the middle of the paragraph
    and then at the end, we close the USF.

    The waits won't be very long, around ten seconds or so.

    Thank you, see you later, have a good afternoon.

    Best regards, duduleray
    0
    1. f894009 Posted messages 17417 Registration date   Status Member Last intervention   1 717
       
      0
      1. duduleray > f894009 Posted messages 17417 Registration date   Status Member Last intervention  
         
        Hi, I can't access the site my share
        it might be due to network congestion even though I have fiber

        I will wait a bit and then I will try again

        I retrieved the file.
        0
      2. yg_be Posted messages 23437 Registration date   Status Contributor Last intervention   1 588 > duduleray
         
        It's the site that is overloaded, not your local Internet access.
        Try again.
        0
      3. duduleray > yg_be Posted messages 23437 Registration date   Status Contributor Last intervention  
         
        Hi yg_be,

        Thank you for the info, I just retrieved the file, it's the first time it's been this long.
        Have a nice evening, thank you

        Regards, Duduleray
        0
  6. duduleray
     
    Re f894009,

    Thank you for the file, it works well.

    So for me, it's good, I thank you for creating the little code, that's nice of you.

    I will mark the topic as resolved

    Have a good evening and thanks again.

    Best regards, DuduleRay
    0