I have a workbook with the following code. The backdrop is that I have another VBA code that prompts the user to select a raw data source file (all in one folder) to upload to the destination book. Once uploaded the destination book runs macros to calculate the data. This piece works great. However, my problem lies in the code below (brand new code, to me). This code is supposed to paste the file name (into "AI1) and date/time last modified (into "AJ1") from the specific source sheet selected by the user, into the sheet where the raw data is uploaded in the destination book. What the code below is doing is pasting the file name and date/time modified information (great) for ALL of the files in my "Data Source" folder. By the way, I'm a VBA novice. I cannot figure out how to have this code paste these two pieces of information (FILE NAME and DATE/TIME MODIFIED) for only the file selected for upload into the destination. Any clues? Thank you.
Filepath copy/paste code (pastes all files in the folder -- not desired)
Bookmarks