I am new to VBA and I am trying to figure out how I can use VBA to fill out an online risk calculator using data from excel

obu2024

New Member
Joined
Sep 17, 2024
Messages
1
Office Version
  1. 365
  2. 2021
Platform
  1. MacOS
I’m looking for some assistance with a VBA code that can use data from an Excel spreadsheet to automatically fill out the fields in the ASCVD Risk Calculator found at this link. The idea is to streamline the process of entering patient data into the calculator directly from the spreadsheet.

The data I have includes common fields such as age, cholesterol levels, blood pressure, and other relevant health information. I'd like the VBA script to:

  1. Extract data from specific cells in Excel. (No clue how to do this for multiple different data sets)
  2. Input this data into the corresponding fields in the web-based risk calculator.
  3. Retrieve the calculated risk result back into Excel.
1726593416724.png


EDIT: Does not have to be on MacOS
 
Last edited by a moderator:

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
I’m looking for some assistance with a VBA code that can use data from an Excel spreadsheet to automatically fill out the fields in the ASCVD Risk Calculator found at this link. The idea is to streamline the process of entering patient data into the calculator directly from the spreadsheet.

The data I have includes common fields such as age, cholesterol levels, blood pressure, and other relevant health information. I'd like the VBA script to:

  1. Extract data from specific cells in Excel. (No clue how to do this for multiple different data sets)
  2. Input this data into the corresponding fields in the web-based risk calculator.
  3. Retrieve the calculated risk result back into Excel.
View attachment 116958

EDIT: Does not have to be on MacOS
Would it not be easier to agree to the American Heart Association's PREVENT™ License Agreement and include the logic in an Excel spreadsheet?

Once we know the logic I'm sure that we can help you implement it.
 
Upvote 0
Looks like that web page doesn't work with Internet Explorer - if it did the automation is more straightforward because standard Windows libraries can be used. Therefore you would need to install SeleniumBasic and a suitable web browser driver (I prefer EdgeDriver since Edge is now part of Windows) for VBA to fill in the web page form from Excel cells and retrieve the calculated result to Excel.
 
Upvote 0

Forum statistics

Threads
1,223,884
Messages
6,175,175
Members
452,615
Latest member
bogeys2birdies

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