Home > Forum Home > Automating Data Analysis Tasks > Run Macro IF Specific URL Changes | Share |
Forum Topic | Post Reply Login |
Run Macro If Specific Url Changes | Rate this: (3/5 from 1 vote) |
Fire Macro Only IF Specific URL Address Change Is Requested From WebBrowser Object? I am using a WebBrowser Sub that runs a macro when the URL Address changes. The problem is it fires the macro each time the browser is refreshed because it changes (or refreshes back to itself and runs the macro). I would like the macro only to run ONLY when a SPECIFIED URL is requested. The code beneath works great. All are welcome to try this code for yourself (click on the developer tab>insert tools>more tools>microsoft web browser>draw browser>paste code beneath in vba) VBA Code:
The only problem is (as stated above), it launches each time the page is opened or refreshed. I am in need of a way to code this the right way so that it only runs the macro if a specified URL address is requested only. This way the macro will not fire up at start up or when the page is refreshed, but yet only when the specified page is loaded with the web browser. VBA Code:
Can anyone help me with the correct working syntax for this code? | ||||
Posted by indi visual on |
Replies - Displaying 1 to 3 of 3 | Order Replies By: Most Recent | Chronological | Highest Rated |
Rate this: (3/5 from 1 vote) In the macro, you then add the conditional statement. VBA Code:
| ||
Excel Business Forums Administrator | ||
Posted by Excel Helper on |
Rate this: (3/5 from 1 vote) | |
Posted by indi visual on |
Rate this: (3/5 from 1 vote) | |
Excel Business Forums Administrator | |
Posted by Excel Helper on |
Displaying page 1 of 1 |
Find relevant Excel templates and add-ins for Run Macro IF Specific URL Changes in the Excel Business Solutions Directory |