Comments for Automate Excel Excel Tutorial Fri, 23 Feb 2018 20:18:57 +0000 hourly 1 Comment on Automate Internet Explorer (IE) Using VBA by Martin Noyes Fri, 23 Feb 2018 20:18:57 +0000 Good example but I have another question. I would like to record a website’s audio unattended and silently using windows task scheduler. Is there a way to divert IE’s audio to a virtual audio cable such as Vb or VAC and have it be quiet? The other problem would be to activate the audio. Most websites (but not all) require you to press a start button to begin the audio stream. When running under task scheduler IE would be running invisibly in session 0 and there is no way to do a mouse click or even a send keys (I think).

Comment on Automate Internet Explorer (IE) Using VBA by Sneha Thu, 15 Feb 2018 14:16:52 +0000 Hi
Excellent explanation. I have a query.
HTML code

Im using the above approach bt on clicking the button, it shows me message from ie asking do u want to save, yes or no. If yes then it will check the duplicate data. If duplicate data exists it will give me validation error pop-up. Or else it will save the data n give me another message from ie saying data saved.
I want to capture the return value whether it is true or false.

Comment on VBA INSTR – Find Text in a String by Nishanth Thu, 08 Feb 2018 10:31:35 +0000 Sunny
for finding the number of time a word is repeated you may have to use replace function. Replacing the word with one less word and counting the word length difference between each words will give you the repetition number.

MsgBox Len(“Look in this string, Look”) – Len(Replace(“Look in this string, Look”, “Look”, “Loo”))

Comment on Working with Page Breaks in Excel & VBA by JustAnAnalyst Tue, 06 Feb 2018 20:49:49 +0000 Hoping you’ll still respond to this. Is there a way to “goto next page break” in an excel macro? I’m dealing with output from other software that already has the page breaks inserted. I want to break this data up into tabs rather than one long tab.

Comment on Automate Internet Explorer (IE) Using VBA by Rm Tue, 06 Feb 2018 11:57:15 +0000 Hi Martin.

There is no such extension for VBA . The thing you are asking how ie magically appear in VBA is called a reference.
Firefox and chrome doesnt have their references for use with VBA.

Comment on Automate Internet Explorer (IE) Using VBA by Steven Rynearson Sun, 14 Jan 2018 22:48:08 +0000 Hi sorry for the late reply.

1. I’ve never tried to use Chrome or Firefox. Internet Explorer is Microsoft software so it works well with VBA. You would use a similar method to open PowerPoint, Word, etc. (other Microsoft software). Unless you have a good reason, I would stick to IE if you’re trying to use VBA.

2. Every browser has “Developer Tools” or something similar that lets you dive into the code of how a website loads. I’m not sure if you can find the ReadyState there, but there is other useful information.


Comment on Automate Internet Explorer (IE) Using VBA by Martin Noyes Wed, 03 Jan 2018 00:53:44 +0000 I’m new to VBA and rusty on the old standalone VB so please forgive me if I ask stupid questions.

1. Your first example: ‘Create InternetExplorer Object
Set IE = CreateObject(“InternetExplorer.Application”)
How does this get translated into the exact path to the iexplore.exe executable? What if I wanted to use Chrome or Firefox? Would “”Firefox.Application” magically find the executable?

2. “‘IE ReadyState = 4 signifies the webpage has loaded (the first loop is set to avoid inadvertently skipping over the second loop)
Do While IE.ReadyState = 4: DoEvents: Loop ‘Do While
Do Until IE.ReadyState = 4: DoEvents: Loop ‘Do Until”
How do you know that the ready state for IE is decimal 4? Where does one look that up? Would it be the same for other browsers? And what other parameters are defined for browsers and where can they be found?

Thanks for a great article. Very enlightening. And I agree with you about the SendKeys. Tried it in a macro and what a self destroying disaster it was. The object (a calculator) immediately lost focus and the macro started writing all over itself. Keeping the focus on the object looks like a major problem.

Thanks Again.

Comment on Automate Internet Explorer (IE) Using VBA by Martin Sun, 31 Dec 2017 03:20:38 +0000 I cann’t get the first example to run. I got a 429 error – active x can’t create object. How is this possible since Internet Explorer comes with O.S? I’m running a new Office 2016 Excel install. I must admit I am a loss to understand how the create object resolves down to the path name of the application c:\Program Files\Internet Explorer\iexplore.exe What if I wanted to launch a different web browser like Firefox?

Comment on VBA – Cut, Copy, Paste from a Macro by Mohamed Thu, 28 Dec 2017 14:31:07 +0000 Thanks very helpful

Comment on VBA – Cut, Copy, Paste from a Macro by Steven Rynearson Thu, 21 Dec 2017 14:31:44 +0000 If you copy+paste without inserting a row that might help. Otherwise you can use the formulaR1C1 property to define the formula from within VBA.