Sub GetData()
Dim wb As Workbook
Dim mp As String
Dim mf As String
Application.ScreenUpdating = False
'以只读方式打开工作簿
mp = ThisWorkbook.Path & "\" '路径
Set wb = Workbooks.Open(mp & "数据.xlsx") '打开
With ThisWorkbook.Sheets("Sheet1")
'从工作簿中读取数据
.Range("A1").Formula = wb.Sheets("Sheet1").Range("D8").Formula
.Range("A2").Formula = wb.Sheets("Sheet1").Range("E8").Formula
.Range("A3").Formula = wb.Sheets("Sheet1").Range("F8").Formula
'wb.Sheets("表1").Range("A1").Copy .Range("A1") '复制
End With
wb.Close False '关闭打开的源数据工作簿且不保存任何变化
Set wb = Nothing '释放内存
Application.ScreenUpdating = True
End Sub