Can Excel command another application?

bubububub

New Member
Joined
Jul 2, 2010
Messages
18
Hello,

Using VBA to write an excel macro, is it possible to command another application, in my case Internet Explorer?

If so, Could you please help me design a code to complete these tasks:

Select a number in a column (from Excel 2007)
Switch to internet explorer
paste the number (The box on the website should already be selected. In case it matters, the link is http://www.upcdatabase.com/itemform.asp)
hit enter
copy the url
hit back on the browser (This should also reselect the box for entering the next number, or at least it does when I use the backspace key after clicking on the page.)
paste the url in the column next to the number
and repeat the process again with the next number in the column

Is this even possible?

Thank you immensely for your help,
Bub
 
Norie,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p></o:p>
Sorry for the delay. I broke for lunch.<o:p></o:p>
<o:p></o:p>
It sounds to me like the code you wrote is designed to do exactly what I want. The only problem is the error:<o:p></o:p>
Run-time error '91':
Object variable or With block variable not set<o:p></o:p>
<o:p></o:p>
<o:p></o:p>
which comes up after only one box is filled with its appropriate url. When I choose the debug option, this line is highlighted:<o:p></o:p>
doc.all("upc").Value = rngUPC.Text<o:p></o:p>
<o:p></o:p>
<o:p> </o:p>
So close,
Bub
 
Upvote 0

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

Forum statistics

Threads
1,223,236
Messages
6,170,915
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top