Igot this VBA code on this forum. It works perfectly for my purpose but I justneed some help for a small revision.

Insteadof selecting or looking for the file, I want to have a code to select thespecific drive and file. The file to be imported is from drive Z:\SHARED\DATA\LOCATION.xlsb

(i think this line should be revised, "vFile = Application.GetOpenFilename("Locator Files Only(*.xlsb)," & "*.xl", 1, "Select Locator File", "open", False)"

Hereis the code: (also please check if the sequence is correct)

SubLOCATOR()
Application.ScreenUpdating = False
Dim vFiles As Variant
Dim wbCopyTo As Workbook
Dim wsCopyTo As Worksheet
Dim wbCopyFrom As Workbook
Dim wsCopyFrom As Worksheet

Set wbCopyTo = ActiveWorkbook
Set wsCopyTo = ActiveSheet
lastrow =Range("A7").End(xlDown).Row

vFile = Application.GetOpenFilename("LocatorFiles Only(*.xlsb)," & "*.xl", 1, "Select LocatorFile", "open", False)

If TypeName(vFile) = "Boolean"Then
Exit Sub

Else
Set wbCopyFrom = Workbooks.Open(vFile)
Set wsCopyFrom = wbCopyFrom.Worksheets("DATAENTRY")
End If
'--------------------------------------------------------------
'Clear contents of Target worksheet
wsCopyTo.Range("D7:Q" &lastrow).ClearContents
'Copy Range
wsCopyFrom.Range("B7:O" &lastrow).Copy
wsCopyTo.Range("D7").PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone,SkipBlanks:=False, Transpose:=False
Application.DisplayAlerts = False
'Close file that was opened
wbCopyFrom.Close savechanges:=False
Application.DisplayAlerts = True
Application.ScreenUpdating = True

End Sub


Thank you in advance.