Is there a faster way to import a column from a specific excel file as an array with VBA?
The code that I'm currently using has to open the excel file. Is there a way to do this in the background? Is there a way to read values row by row from the first column?
Thanks
My code below:
Sub LoadExcelArray()
Dim Vendor As Variant
Dim wb As Workbook
Dim sFile As String
sFile = "D:\Desktop\test.xlsx"
Application.ScreenUpdating = False
Set wb = Application.Workbooks.Open(sFile)
Vendor = wb.Sheets(1).Range("A1:A95").Value2
wb.Close False
Application.ScreenUpdating = True
MsgBox Vendor(30, 1)
End Sub