Get data out of excel and into Varibles
Posted on 2001-06-14
I posted this question this morning and thought the answer was right but I did test all of the code. I need to query a excel spread sheet and then if is what I want I need to grab some field out of excel and put to varibles...Here is what someone gave me this morning...
'Dim xl As Excel.Application
If xl Is Nothing Then
Set xl = CreateObject("Excel.Application")
xl.DisplayAlerts = False
xl.DisplayAlerts = True
yourVariable = _xl.sheets("sheetname").range("your column, row).value
Set xl = Nothing
yourvarible = xl.sheet(etc..) did not work,
I need to make this work...