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!
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.
抱歉,我的英文不太好 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")?
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?
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
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
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
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
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}"
+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.
+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.
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.
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!
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
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.
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?
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
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!
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?
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.
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?
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.
I'm from Brazil, I'd like to thank you, It works!
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!
Hey Alex, thank you man!
Thank you for this solution! Works great :)
This video is AMAZING thank you so much !
Thanks a lot Alex. You been of great help!!!
Thank you very much Alex. Great Help.
Thank you!! This helped me a ton!!
Thanks!
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!
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.
非常需要 感谢
Thank you so much, Very usefull
Hello Alex.. Thanks for the solution. Its working for me :-)
Thanks and it was amazing because it worked for me
me sacaste de una gran duda, Gracias!!!
Very helpful. How do you stop the wscript from running after pressing enter the vbs file, or will it only work once, then close?
Thanks so much.
Alex, how can you write the code in VBA for knowing what the message box from the web says???
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
Hi! Nice solution... I just want to ask if you know how to handle with a print dialog from Internet explorer?. Any idea?
You're awesome bro!
抱歉,我的英文不太好
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")?
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?
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
How would you do to make an offline web wich controls the excel calculations and then shows you back in the browser?
Thank you
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
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
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
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}"
+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.
Hi Alex, it was just matter of sleep time. Finally, it is working like a charm!!. Thanks a lot Man!!!
+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.
+Rahul Malik Hi Rahul! I guess you need to take control to that windows dialog box. Only then send keys will work.
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.
without creating .vbs file can we do that same some written on same code. by calling function
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!
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
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
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.
this way
If ret = True Then
wshShell.SendKeys "%{F4}" 'ALT F4
exit do:
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
how can you stop the script once the application is finished?
Once the loop is satisfied it moves on to the next line. There is no next line so script will simply stop running
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?
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
but iam automating a webpage so this message box appears multiple times, so how I can make this to click that many times only?
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!
how to alt + s to save the file from the pop up. Please
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?
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.
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?
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.
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.
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.
VBA Excel: How can I retrieve the contents of the text of a message from webpage and then click OK?
Dario, did you find the answer to your question?