VBA Excel Macro Stops Working When a Dialog Box Pop Up Appears - InternetExplorer.Application

Поделиться
HTML-код
  • Опубликовано: 22 июл 2024
  • InternetExplorer.Application - VBA Excel Macro Stops Working\Responding When a Dialog Message Box Pop Up Appears
    Handy Excel Resources
    amzn.to/3gFx7s1 - Excel Formulas & Functions For Dummies 5th Edition
    amzn.to/3sYnuH6 - Microsoft Excel 2019 VBA and Macros
    amzn.to/2PqXhU0 - MICROSOFT EXCEL VBA AND MACROS FOR BEGINNERS:
    amzn.to/3xtsLtM - Microsoft Excel VBA Programming for the Absolute Beginner
    amzn.to/3xwkEg0 - Excel 2019 Bible
    amzn.to/3aJEHxW - EXCEL 2020 FOR BEGINNERS
    As an Amazon Associate, I earn from qualifying purchases. Product prices and availability are subject to change.
  • НаукаНаука

Комментарии • 76

  • @horhe0423
    @horhe0423 8 лет назад

    Sir I just searched this video. Thank you for posting this. Solved the problem that's been bothering me for 2 days now. Really thank you!

  • @rafaelcavalcante7445
    @rafaelcavalcante7445 4 года назад +1

    I'm from Brazil, I'd like to thank you, It works!

  • @matwenty8
    @matwenty8 8 лет назад +1

    Thank you!! This helped me a ton!!

  • @piyushpalsingh
    @piyushpalsingh 6 лет назад

    Thanks a lot Alex. You been of great help!!!

  • @kajak4
    @kajak4 8 лет назад +1

    Thank you for this solution! Works great :)

  • @VivekSharma-md1by
    @VivekSharma-md1by 8 лет назад

    Thank you very much Alex. Great Help.

  • @TheCliinou92
    @TheCliinou92 4 года назад

    This video is AMAZING thank you so much !

  • @FelipeMoralesCayupi
    @FelipeMoralesCayupi 7 лет назад

    me sacaste de una gran duda, Gracias!!!

  • @santhoshkumard3606
    @santhoshkumard3606 5 лет назад

    You're awesome bro!

  • @jonathanundernehr806
    @jonathanundernehr806 Год назад

    Hey Alex, thank you man!

  • @sarathikrishnan2670
    @sarathikrishnan2670 6 лет назад

    Hello Alex.. Thanks for the solution. Its working for me :-)

  • @laxmikantkulkarni4938
    @laxmikantkulkarni4938 5 лет назад

    Thank you so much, Very usefull

  • @girishshewale1160
    @girishshewale1160 7 лет назад

    for chrome driver it's give a pop-up inside the chrome window it self, is it possible to send keys to that pop-up as well using vbs

  • @MsDiscojack
    @MsDiscojack 5 лет назад

    Thanks and it was amazing because it worked for me

  • @ninatunas4695
    @ninatunas4695 2 года назад

    Thanks!

  • @vanchien5874
    @vanchien5874 4 года назад

    Thanks so much.

  • @lexlopez81
    @lexlopez81 6 лет назад

    Alex, how can you write the code in VBA for knowing what the message box from the web says???

  • @Im_Kathir
    @Im_Kathir 8 лет назад

    Hi Cantu, I doing automation for file uploading though VBA but my program stop after file browser explorer window pop so can i use this for my automation program.

  • @zsoltpal7905
    @zsoltpal7905 4 года назад

    Thank you very very much!! Just the thing I was looking for against the script stopping webpage dialog box. Now I only have to figure out how to click on an "Insert" button on the the dialog box instead of sending Enter (which would just close it). Thanks!

    • @zsoltpal7905
      @zsoltpal7905 4 года назад

      Done it :) Thank you again, you probably saved my life, as I was just about dying from boredom clicking on 10,000+ popups at work. Now I just do something else while the computer does it.

  • @muhammedwafa9646
    @muhammedwafa9646 4 года назад

    Please advise, I have a problem with my Excel sheets it has equations and simple codes to navigate between the sheets . But I have to work on 4 or may be 6 sheets at the same time. But Excel tends to crash every time and shows the message"Excel has stopped working " as soon as I got the enable macro button.
    Thank you

  • @avikhazra7019
    @avikhazra7019 7 лет назад

    without creating .vbs file can we do that same some written on same code. by calling function

  • @twanbiz
    @twanbiz 8 лет назад

    i need to iterate the vbs script but there is no goto function - how do you recommend if during the macro there will be multiple webpage popups that will need to be closed and not just one?

  • @user-nj3di5uo5r
    @user-nj3di5uo5r 5 лет назад

    Thank you

  • @utahenduro4808
    @utahenduro4808 6 лет назад

    Very helpful. How do you stop the wscript from running after pressing enter the vbs file, or will it only work once, then close?

  • @MrWildy54
    @MrWildy54 8 лет назад

    Hi! Nice solution... I just want to ask if you know how to handle with a print dialog from Internet explorer?. Any idea?

  • @atallpa
    @atallpa 2 года назад

    How would you do to make an offline web wich controls the excel calculations and then shows you back in the browser?

  • @xaubtc
    @xaubtc 2 года назад

    非常需要 感谢

  • @maurosaldana500
    @maurosaldana500 3 года назад

    Works great with active screen, but when I did another script to run my macro (that runs your script) at downs it never closes the pop up so when I arrived to work the pop up was there. What could I do to solve that issue? Regards

  • @rahulmalik1570
    @rahulmalik1570 8 лет назад

    Hi Alex,
    I need to enter filepath in dialog box , this dialog
    box is popup window on click of browse button in a webpage.
    I am able to click browse button but can't enter this filepath.
    Cursor is blinking on FilePath in popup window but am not able to enter value in it.
    Code I tried :-
    IEBrowser.document.getElementById("file").value= "C:\abc.txt IEBrowser.document.getElementById("file").Click
    Application.wait(Now() + 00:00:05)
    sendkeys(filepath)
    but path is not typed in popup window.
    any suggestions.

    • @slipvanei
      @slipvanei 5 лет назад

      this way
      If ret = True Then
      wshShell.SendKeys "%{F4}" 'ALT F4
      exit do:

  • @singo1232001
    @singo1232001 7 лет назад

    抱歉,我的英文不太好
    Sorry, my English is not very good
    靠google翻譯
    by google Translate
    先感謝您解決了我的問題
    Thank you for solving my problem
    我發現兩個問題
    I found two questions
    1.程式會在後台沒有關閉,開啟工作管理員會發現
    1.Program in the background will not stop, open the work administrator will have
    2.沒有標頭的alert要怎麼做,是否為elementbytagname("input")
    2.Alert how to do without the header, is elementbytagname("input")?

  • @nocode659
    @nocode659 6 лет назад

    how to alt + s to save the file from the pop up. Please

  • @deepakjoy7732
    @deepakjoy7732 7 лет назад +1

    Hi Alex, thank you for the solution , but i have small query , is there another way to resolve this pop up issue , because in my company vbs scripts are blocked , so i cannot use this method

    • @kaz81884
      @kaz81884 6 лет назад

      I got it working in my Excel without the script. In my case I know exactly when the pop up is going to fire so I do not need to look for it
      created the object when I created the IE object
      Set wsShell = createobject("WScript.Shell")
      (adding following where the popup fired)
      wsShell.AppActivate ("Message from Website")
      wsShell.SendKeys "{ENTER}"

  • @techystack479
    @techystack479 4 года назад

    Hi Alex i am facing one error while exporting the data from SAP error was M04:connection to partner '10.127.167:3201' broken
    WSAECONNRESET: connectionrest by peer
    When i get this error while running macro unable to get into code as well. Please help to resolve,
    Thanks in advance

  • @yixiongluo3890
    @yixiongluo3890 Год назад

    how about when I open the excel, and there is an alert window pop up in the excel? it also stops the macro working, but I don't know how to solve this issue. Thanks!

  • @pompypieman
    @pompypieman 9 лет назад +1

    Hi, this is so useful, I have used this type of function on a page successfully, my issues is how to achieve this when screen saver activates ( I can't disable screen saver), Can I do this with API ? any assistance gratefully received

  • @ravichandran0077
    @ravichandran0077 7 лет назад

    but iam automating a webpage so this message box appears multiple times, so how I can make this to click that many times only?

  • @sukeshkumar831
    @sukeshkumar831 8 лет назад +1

    +Alex Cantu Thanks Alex!!! Great video!! My requirement is exactly what you explained in this video. Everything works fine but in the end "Sendkeys" is not working.
    As targeted it finds the window, brings it onto the top but, skips pressing "Enter".
    Can you please let me know why is it failing to press "Enter", or help me out with any other alternative.

    • @sukeshkumar831
      @sukeshkumar831 8 лет назад

      Hi Alex, it was just matter of sleep time. Finally, it is working like a charm!!. Thanks a lot Man!!!

    • @rahulmalik1570
      @rahulmalik1570 8 лет назад +1

      +Sukesh Kumar
      I need to enter filepath in dialog box , this dialog
      box is popup window on click of browse button in a webpage.
      I am able to click browse button but can't enter this filepath.
      Cursor is blinking on FilePath in popup window but am not able to enter value in it.
      Code I tried :-
      IEBrowser.document.getElementById("file").value= "C:\abc.txt IEBrowser.document.getElementById("file").Click
      Application.wait(Now() + 00:00:05)
      sendkeys(filepath)
      but path is not typed in popup window.
      any suggestions.

    • @sukeshkumar831
      @sukeshkumar831 8 лет назад

      +Rahul Malik Hi Rahul! I guess you need to take control to that windows dialog box. Only then send keys will work.

  • @dundappa100
    @dundappa100 7 лет назад

    Hi I have successfully excuted my program but I am stucked on the last part of my code wherein I have to manually click on ok tab so that macros continues kindly help

  • @user-mx4zn8ip9e
    @user-mx4zn8ip9e 2 года назад

    Thanks. But how to close it once the vba code is done? The windows has been very memory leaking as compared with other operating systems. Thanks again

  • @TheCliinou92
    @TheCliinou92 2 года назад

    Hey guys,
    I am using this script to close a pop-up I am not 100% will show up.
    I am using "taskkill /f /im wscript.exe" at the end of my loop to kill the process in case the window did not pop up. If I don't do this the process can run 1000x in parallel. Is there any risk using this command?

  • @harish6268
    @harish6268 3 года назад

    Hi Sir,
    I tried it, but getting error I'm not authorized to run this script
    Is there any vba code...which directly click ok on this message box

  • @thomasfergusen5144
    @thomasfergusen5144 2 года назад

    Hello, i have a question: "thisworkbook.save" code takes alot of time (even i did "Application.CalculateBeforeSave = False" and "Application.Calculation = xlCalculationManual") so i decided to use that code only in "Private Sub Workbook_BeforeClose(Cancel As Boolean)" subroutine. But the problem is when electric is off or somehow programme get a runtime error vba does not read the code. ( i dont want to get recovery offering because of users not familiar that) so what to do? Thanks!

  • @pliniomsann
    @pliniomsann 7 лет назад +2

    how can you stop the script once the application is finished?

    • @johnar9641
      @johnar9641 6 лет назад

      Once the loop is satisfied it moves on to the next line. There is no next line so script will simply stop running

  • @dariofurlani3397
    @dariofurlani3397 9 лет назад

    VBA Excel: How can I retrieve the contents of the text of a message from webpage and then click OK?

    • @lexlopez81
      @lexlopez81 6 лет назад

      Dario, did you find the answer to your question?

  • @shlerTHEnumbas
    @shlerTHEnumbas 9 лет назад

    so I have to pass the path of a file from the workbook to the VBscript. How would I do that? I have to find the form in the window and then hit submit?

    • @alexcantu3
      @alexcantu3  9 лет назад

      Create the VBScript file and place it anywhere you'd like on your PC. The VBS script is what needs to find the window and close it. If you are trying to close out a dynamic form, that was loaded within the page, that is a different scenario.
      If you are trying to close a window\form that loaded within the web page, you'll need to just refresh the browerser's document.body, and from there decide what actions need to be taken to close it out.
      The example I showed in this video is to close a window that a web page created, but this window exists outside of the Internet Explorer Window.

    • @shlerTHEnumbas
      @shlerTHEnumbas 9 лет назад

      for sure, I created the VBScript and it worked. it added the word I wanted to the window, but now I need to add a variable that grabs the path from the workbook. how can I add a variable from the workbook into the VBScript file?

    • @shlerTHEnumbas
      @shlerTHEnumbas 9 лет назад

      I guess I will just have it open and change the variable in the text file and re save it each time. unless there is an easier way.

    • @alexcantu3
      @alexcantu3  9 лет назад

      James Mutscheller Am I understanding that you are using the VBS script to send a certain string to a box? So you need to modify the VBS file so that it sends a particular string? If so, I have a pretty simple solution. Let me know if this is the case.

    • @shlerTHEnumbas
      @shlerTHEnumbas 9 лет назад

      correct. I am trying to send a string to the browse box. it is essentially a get file box, and I am trying to send the path for an image.