VBA code to return back to VBA code to continue executing

L

Legacy 316613

Guest
Hi All,

Very new to VBA and continuously learning thanks to this forum.

Here is my problem.

I have a worksheet with three hyperlinks which are actually Google Doc files which have been published.
This has allowed me to capture the URL and be able to download the Google Doc files.

Code is standard as:
ActiveSheet.Range("A1").Hyperlinks(1).Follow
ActiveSheet.Range("A2").Hyperlinks(1).Follow
ActiveSheet.Range("A3").Hyperlinks(1).Follow

When the code is executed, it does what I want which is to download each of the Google Doc files in xlsx format.

These files are then stored in the User's Download folder.

I have been able to find a code which identifies the User's Download folder which is:

Dim mypath as String
mypath = Environ("SystemDrive") & Environ("HomePath") & "\Downloads\"

The problem I have is that once the files download to the "Downloads" folder, I cannot seem to "return" back to the VBA code to continue running which is the process of opening each of the downloaded files, with names lets assume A,B,C and copy the entire range in Sheets(1) of each file and paste to the active workbook (lets call it Filename "X") in Sheets(3) to Sheets(5)

The copy workbook and paste range to active workbook is simple and have found many suggestions in this forum.

In summary, my issue is that I CANNOT get the macro to "RETURN BACK" to the VBA code once the files are downloaded.

Any help will be most appreciated and sorry for the lengthy explanation :)
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

Forum statistics

Threads
1,215,046
Messages
6,122,849
Members
449,096
Latest member
Erald

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