Forum Discussion

philipmikheikin's avatar
philipmikheikin
Copper Contributor
Dec 29, 2021

vba start edge

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

11 Replies

    • philipmikheikin's avatar
      philipmikheikin
      Copper Contributor
      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.
      • NikolinoDE's avatar
        NikolinoDE
        Gold Contributor

        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)

         

         

    • philipmikheikin's avatar
      philipmikheikin
      Copper Contributor
      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
      • philipmikheikin's avatar
        philipmikheikin
        Copper Contributor
        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.

Resources