Public excelapp As New Excel.Application
Dim fd As FileDialog
Dim Filepath As String
dim arr(1 to 100) as integer
filepath=你引用的那个文件的全部路径名称+文件名称
Set Workbook = excelapp.Workbooks.Open(Filename:=filepath)
With excelapp.Application
'--------------------------------你要引用什么就写下面,比如 我把目标文件中sheet1的A1-A100的值赋值给Arr数组
For x = 1 To 100
arr(x)=.sheets(1).cells(x,1).value
Next x
End With
excelapp.Application.DisplayAlerts = False
excelapp.Application.Quit
不打开不可能,只是在后台打开,不显示而已,引用完成后再后台关闭