Vba to import CSV via Chrome

Dwg

New Member
Joined
Oct 21, 2020
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hello !
I’m a real beginner in VBA , I need to created a report and I would like to automate it as much as possible . So I have a CSV file located on the web , I need to download it and copy paste it content in my report . To do so I created a first sub that open Chrome with the link of the file I need to download . No issue , file download automatically but in my personal user download folder and I will need to download it on a shared drive .
I thought that maybe I can use the delete and then move function ( as movefile only cannot overwrite ) but maybe there is a way to set the shared drive folder directly ?
Thanks for your help !
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Hello there and welcome. Instead of a sub etc. why don't you create a data link directly to the file? You can do this from the Data tab, then choose Fron Text/CSV.
 
Upvote 0
Thank you ! I tried but it doesn’t work as to connect to this page we have to be logged to a external network accessing via OTP .

so the only solution I found was to already been log on the platform and then launching the macro to open Chrome and download the file .

for the moment I added a delete and then move function to put the file on the shared folder . It works ! Now I’m stuck at importing the data to my report ... real beginner ! Thanks for your help .
 
Upvote 0

Forum statistics

Threads
1,214,965
Messages
6,122,500
Members
449,090
Latest member
RandomExceller01

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