Public Function ReadExcelCell (pathway,sheetname,x,y)
Dim srcData,srcDoc,ret
Set srcData = CreateObject("Excel.Application")
srcData.Visible=false
Set srcDoc= srcData.Workbooks.Open(pathway)
srcDoc.Worksheets(sheetname).Activate
ret = srcDoc.Worksheets(sheetname).Cells(x,y).value
srcData.Workbooks.Close
ReadExcelCell = ret
Set srcData = Nothing
Set srcDoc = Nothing
End Function