i Guy's a little stuck with the the correct method for this one, i am trying read a specific cell from an excel file from Access vba
This is what i have got so far with a msg box to return a result, msg box comes up but no data.
Once I get the method correct am going to play about with viewing a range of cells from an recordset.count (Not got this far yet just trying return data first)
Code:
Dim xlROW As LongDim myRow As Integer
Dim strFilePath As String
strFilePath = "C:\Users\myName\Desktop\Weekly Bookings\11-11-20 WEB UPDATE.xlsx"
Dim xl As Excel.Application
Dim xlsht As Excel.Worksheet
Dim xlWrkBk As Excel.Workbook
Dim myResult As String
Set xl = CreateObject("Excel.Application")
Set xlWrkBk = GetObject(strFilePath)
Set xlsht = xlWrkBk.Worksheets(1)
myResult = xlsht.Cells(3, 3).Value
MsgBox (myResult)
Set xl = Nothing
Set xlWrkBk = Nothing