I'd like to open up a closed file and copy over the info into a new worksheet. I've tried recording a Macro to do this but I'm getting hung up on the range select.
The closed file has only one worksheet named identically to the file. i.e. The file is 694564 and so is the worksheet. The destination for the copied worksheet should be Sheet2(Data).
???
The closed file has only one worksheet named identically to the file. i.e. The file is 694564 and so is the worksheet. The destination for the copied worksheet should be Sheet2(Data).
HTML:
Private Sub CommandButton1_Click()
Dim FileNameCell As String
FileNameCell = Sheet9.Range("A" & 2).Value
Const ChooseStationCell = "B17" 'Validation list cell address
Const FileNameExt = "CSV" 'External data file extention
Const FileFolder = "C:\Data\DSF2" 'Folder with external data files
'Find file
FileName = FileFolder & "\" & FileNameCell & "." & FileNameExt
Open FileName
'Copy Sheet1 FileNameCell then paste to Data sheet
Close FileName
???