Hi All,
can any one help me with a macro which will ask to select the excel file from the path(getopenfile method) and paste in current workbook
I am using below code however it takes long time to run
Option Explicit
Sub import()
Dim filename As String
Dim curfilename As String
curfilename = ThisWorkbook.Name
filename = Application.GetOpenFilename("Excel Files (*.Xlsx),*.Xlsx", , "Please select Master")
'filename = Application.GetOpenFilename
Application.ScreenUpdating = False
Dim x As Workbook
Set x = Workbooks.Open(filename)
With Sheets("Security List from System")
x.Sheets("Security List from System").Range("A1:L75000").Copy
End With
Windows("Report Compare V2.xlsm").Activate
Sheets.Add.Name = "Master"
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.DisplayAlerts = False
x.Close SaveChanges:=False
End Sub
Thanks
Last edited: