• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

VBA to send data from excel spreadsheet to a website form and return result to spreadsheet|VBA & Macros|Excel Forum|My Online Training Hub

You are here: Home / VBA to send data from excel spreadsheet to a website form and return result to spreadsheet|VBA & Macros|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumVBA & MacrosVBA to send data from excel spreads…
sp_PrintTopic sp_TopicIcon
VBA to send data from excel spreadsheet to a website form and return result to spreadsheet
Avatar
Dave MacIntyre
Member
Members
Level 0
Forum Posts: 7
Member Since:
April 30, 2019
sp_UserOfflineSmall Offline
1
April 30, 2019 - 1:33 am
sp_Permalink sp_Print

Hi all

Can anyone please help with providing code that would allow me to:

1. Send each of the numbers in column A of the attached spreadsheet (and indeed any amount of numbers included in column A) ie:-

238554836
166913834
205963701
343475355
220430231

to http://ec.europa.eu/taxation_c.....toms/vies/

2. Select GB-United Kingdom on the top down menu

3. Enter each of the numbers in turn into the VAT number box below the above drop down

4. Return the name of the relevant business back to the spreadsheet in column B next to the original VAT number

Any help would be much appreciated?

Thanks
Dave

sp_AnswersTopicSeeAnswer See Answer
Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1514
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
2
May 1, 2019 - 8:59 am
sp_Permalink sp_Print

Hi Dave,

I think I can do this but it will take some time to code + test.

I'll try to get back to you tomorrow.

Regards

Phil

Avatar
Dave MacIntyre
Member
Members
Level 0
Forum Posts: 7
Member Since:
April 30, 2019
sp_UserOfflineSmall Offline
3
May 1, 2019 - 6:28 pm
sp_Permalink sp_Print

Hi Phil

If you can figure it out you will be an absolute legend!

Thanks

Dave

Avatar
Dave MacIntyre
Member
Members
Level 0
Forum Posts: 7
Member Since:
April 30, 2019
sp_UserOfflineSmall Offline
4
May 8, 2019 - 12:01 am
sp_Permalink sp_Print

Hi Phil

Any joy with this - I'm guessing it's proved harder than you first thought? 🙂

Thanks

Dave

Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1514
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
5
May 14, 2019 - 5:17 pm
sp_Permalink sp_Print

Sorry Dave, I am having intermittent success with the code.

The problem I'm having is that once the results page is loaded and I tell the VBA to grab the HTML page contents, it returns the first page where you enter the VAT number. 

Sometimes it gets the correct page, but most of the time it does not.  I can't figure out why.

I'm going to try a different approach and see if I have success with that.

Cheers

Phil

Avatar
Dave MacIntyre
Member
Members
Level 0
Forum Posts: 7
Member Since:
April 30, 2019
sp_UserOfflineSmall Offline
6
May 15, 2019 - 5:19 pm
sp_Permalink sp_Print

Hi Phil

Thanks for the update. The worst kind of coding issues for me are when it sometimes returns the right result - I would rather it didn't work at all than did that as it makes it so frustrating. I really appreciate your efforts - good luck with the different approach!

Thanks

Dave

Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1514
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
7
May 28, 2019 - 3:13 pm
sp_Permalink sp_Print

Hi Dave,

Sorry for the long delay.  This was partly due to other commitments but partly due to getting this to work.  I gave up on using IE.

The attached workbook contains code that will do as you want.  It requires installation of the SeleniumBasic VBA wrapper https://github.com/florentbr/S.....c/releases and you will need to download and install the latest Chrome driver https://sites.google.com/a/chr.....omedriver/

Copy the Chrome driver to the Selenium installation folder which on my PC is C:\Users\pgt\AppData\Local\SeleniumBasic.  This will copy over the driver that came with the SeleniumBasic install.

Selenium is software that allows you to automate a browser.  I used Chrome, and the Chrome driver is the software link between Selenium and the Chrome browser.  So you will need to install Chrome if you haven't got it already.

The code will loop through a list of numbers in Col A until it reaches the last one.

I'm about to write a blog post to elaborate on the process behind all of this.

Regards

Phil

sp_AnswersTopicAnswer
Answers Post
Avatar
Dave MacIntyre
Member
Members
Level 0
Forum Posts: 7
Member Since:
April 30, 2019
sp_UserOfflineSmall Offline
8
May 29, 2019 - 12:44 am
sp_Permalink sp_Print

Thanks Phil - that works perfectly 🙂 The code is pretty simple once you know how to actually do it, but I'd never have figured that out myself, so really appreciate your help. Please could you let me know when your blog post is up, as I would be interested to have a read?

Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1514
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
9
May 30, 2019 - 8:46 pm
sp_Permalink sp_Print

Hi Dave,

Here's the post

https://www.myonlinetraininghu.....ling-forms

Regards

Phil

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Roslyn Finlayson, Shanna Henseler, LAN H
Guest(s) 9
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 870
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
A.Maurizio: 202
Jessica Stewart: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
John Chisholm
vexokeb sdfg
John Jack
Malcolm Toy
Ray-Yu Yang
George Shihadeh
Naomi Rumble
Uwe von Gostomski
Jonathan Jones
drsven
Forum Stats:
Groups: 3
Forums: 24
Topics: 6210
Posts: 27236

 

Member Stats:
Guest Posters: 49
Members: 31888
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.