vba start edge

Contributor

hi. i have cannt open an edge from vba. 

have no experience at this, just watching tutorials on youtube.

did some googling, and still cannot make it. 

 

this a code i am folowing from youtube

 

Sub test_selenium()
   Dim my As Selenium.EdgeDriver
   Set my = New Selenium.EdgeDriver
   my.Start      this line highlights on on debuging
End Sub

have selenium installed, edge driver installed. copied to selenium app data folder. 

now i am getting

runtime error 21. 

timeouterror

the driver failed to open the listening port 127.0.0.1:55981 within 10sec

 

i tried to google it, but stupid enough to not get it clear for me:)

can anyone help so i can keep watching youtube tutorials and without failing on first step

8 Replies

@philipmikheikin 

I believe that this link will help you.

VBA for Microsoft Edge

 

I also wish you a Happy New Year and have fun with Excel.

... not all have New Years on the same date, but all can be happy in the same date :).

nope. it did not help. all is installed, all is in its locations.
also trying othe line of code - still no result

Sub test_selenium()
Dim my As Selenium.EdgeDriver
Set my = New Selenium.EdgeDriver
my.Start this line porps up on runtime error 21
End Sub


if i try this
Private Sub Use_Chrome()
Dim driver As New EdgeDriver
driver.Get "https://www.google.co.uk" this line pops up on runtime error 21
End Sub

if i try this
Sub open_edge()
Dim obj As Object
Set obj = CreateObject("internerexplorer.Application ") this line pops up onr runtime erros 429 acivex component cannot create an object
obj.navigate "google.com"
End Sub
@Chris_Hyslop



i am trying to import prices and item properties from some hardware store.



i am a constructor, and to make a budget i have to
- look for item sku number
- open items page
- verify if it is in stock, how many
- if not enough, look for delivery option, how long it will take
- copy items sku
- memorize price
- paste it to correct cell in my budget table
- type in a price
- in other column type in what store i am getting it from



i know that you can automate such a things with vba. just struggling to make it because i know nothing about vba, that why watching lot of tutorials and starting to learn code,



my plan for automatization is
- create a workbook for all items data
- create worksheet for each hardware store i work with
- for each worksheet write a code to import items data with bunch properties of item
- create sum sheet with items sku and price only, but from different stores



there are going more steps to connect budget file to this "items database".



in each store sheet i have a table with column of "item" and "sku" that i type in once as i am getting new and new item. if i can import all items from the store at one - even better. but i cannot even talk it thru how to do that.



so, i have a column with some sku (example 850888, which id dry pine 2x4).

and want to import all info available about this item in to its columns. if columns with some property does not exist - create one.

my logic for coding for beginning
- open webpage https://www.sodimac.cl/sodimac-cl/
- go to search box

- for each sku in a column (for now it is 850888)

- copy sku

- paste to search box

- press search button

the are more steps to process info provided, but i cannot even open a browser

know that you can just send a request and get page info without browser, but not sure if it will work because i cannot even open a browser.

this is what i am trying to do.
i am trying to import prices and item properties from some hardware store.



i am a constructor, and to make a budget i have to
- look for item sku number
- open items page
- verify if it is in stock, how many
- if not enough, look for delivery option, how long it will take
- copy items sku
- memorize price
- paste it to correct cell in my budget table
- type in a price
- in other column type in what store i am getting it from



i know that you can automate such a things with vba. just struggling to make it because i know nothing about vba, that why watching lot of tutorials and starting to learn code,



my plan for automatization is
- create a workbook for all items data
- create worksheet for each hardware store i work with
- for each worksheet write a code to import items data with bunch properties of item
- create sum sheet with items sku and price only, but from different stores



there are going more steps to connect budget file to this "items database".



in each store sheet i have a table with column of "item" and "sku" that i type in once as i am getting new and new item. if i can import all items from the store at one - even better. but i cannot even talk it thru how to do that.



so, i have a column with some sku (example 850888, which id dry pine 2x4).

and want to import all info available about this item in to its columns. if columns with some property does not exist - create one.

my logic for coding for beginning
- open webpage https://www.sodimac.cl/sodimac-cl/
- go to search box

- for each sku in a column (for now it is 850888)

- copy sku

- paste to search box

- press search button

the are more steps to process info provided, but i cannot even open a browser

know that you can just send a request and get page info without browser, but not sure if it will work because i cannot even open a browser.

this is what i am trying to do.

@philipmikheikin 

Unfortunately, I cannot help you here, my knowledge in this direction is very limited.

That's why the link too.

 

What I can recommend is Microsoft Edge forum

maybe (I'm almost sure you can find more information about the possibilities of the Edge Explorer there.

 

Thank you for your patience and time.

 

NikolinoDE

I know I don't know anything (Socrates)

 

 

Have you tried using power query to get the information from a particular link?
It's in the Data tab. I'm sure you will love it.
Use the Data import wizard to pull information from the link on to excel. Then use functions or macro to process your data.

As far as Power Query is concerned, my knowledge is also limited, but what the user is looking for is certainly not to be filtered out of a link, so I have understood it until now (unless it is what the user wanted :).
But if there is a concrete approach, I would be happy to see it and try it out.

Thank you for your understanding and patience

i ma familiar with power query a little, did get some info from there before. i dont know how to get links in PQ. couse each item comes from its own links. i dont know how to get hundreds of links in pq, or how to to request a link or search for items