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
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