Solved: Accessing excel spreadsheets from word
Right, up until now I've been using the code below to open excel spreadsheets and get data from them. However as the project i'm working on nears the next phase I need to find a more speed effecient method to do it. My boss mentioned trying ODBC but after about and hour and a half on the net I'm no closer to figuring that out than I was when I started. If anyone has any suggestions on how to speed things up, I'm be much appreciative :)
[vba]Private Sub WorkWithExcel()
Dim ObjExcel As Excel.Application
Dim Wkb As Excel.Workbook
Dim WS As Excel.Worksheet
Set ObjExcel = New Excel.Application
Set Wkb = ObjExcel.Workbooks.Open(FileName:=myPath)
Set WS = Wkb.Sheets("Sheet1")
'Do stuff with the worksheet here
Wkb.Close Savechanges:=True
Set ObjExcel = Nothing
Set Wkb = Nothing
Set WS = Nothing
End Sub[/vba]