Hi,
I found the below code posted by Fluff. I think it will allow me to do what I want mostly.
However I want the user to be able to select the file and not have link within the file. Is this achievable?
I found the below code posted by Fluff. I think it will allow me to do what I want mostly.
However I want the user to be able to select the file and not have link within the file. Is this achievable?
PHP:
Sub CopyPasteData()
Dim wb As Workbook
Dim UsdRws As Long
Dim FilePth As String
Application.CutCopyMode = False
Application.ScreenUpdating = False
Application.DisplayAlerts = False
FilePth = "d:\xxxx\xxx\xxxx\xxx.xlsx"
Set wb = Application.Workbooks.Open(FilePth)
UsdRws = Cells.Find("*", After:=Range("A1"), SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
wb.ActiveSheet.Range("A2:C" & UsdRws).Copy Destination:=ThisWorkbook.Worksheets(2).Range("A4")
wb.ActiveSheet.Range("D2:E" & UsdRws).Copy Destination:=ThisWorkbook.Worksheets(2).Range("E4")
wb.Close False
Set wb = Nothing
Application.DisplayAlerts = True
Application.ScreenUpdating = True
Application.CutCopyMode = False
End Sub