I have this code to browse files from another workbook. then when i get the file, paste it on sheet1 range A10. when I go back looking for the next workbook, all I want is to paste that data in the next cell. It's like copying and pasting with dynamic ranges, how to do that? the thing is, my code will just overwrite the data i pasted earlier in the A10 range. obviously this is not what I want.
Sub Get_Data_From_File()
Dim FileToOpen As Variant
Dim OpenBook As Workbook
Application.ScreenUpdating = False
FileToOpen = Application.GetOpenFilename(Title:="Browse for your File & Import Range", FileFilter:="Excel Files (*.xls*),*xls*")
If FileToOpen <> False Then
Set OpenBook = Application.Workbooks.Open(FileToOpen)
OpenBook.Sheets(1).Range("A1:E20").Copy
ThisWorkbook.Worksheets("SelectFile").Range("A10").PasteSpecial xlPasteValues
OpenBook.Close False
Sheet2.Range("A10").Select
End If
Application.ScreenUpdating = True
End Sub