Hello All,
I am trying to use late binding in creating a worksheet and then passing the values from the opened workbook but i get "error 438 : object doesn't support this method or property" in this line
Public Sub CompareHeader(shtsExcelNew As Object, shtsExcelDiff As Object)
dim strDSAbnBl as string
Set shtsExcelNew = CreateObject("Excel.Sheet")
Set shtsExcelDiff = CreateObject("Excel.Sheet")
strDSAbnBl = shtsExcelNew(1).Cells(3, 7).Text --- I get Error 438 in this line
end sub
I tried changing it to range("G3").value but it didn't help.
can someone point me where am i doing it wrong ?
I am trying to use late binding in creating a worksheet and then passing the values from the opened workbook but i get "error 438 : object doesn't support this method or property" in this line
Public Sub CompareHeader(shtsExcelNew As Object, shtsExcelDiff As Object)
dim strDSAbnBl as string
Set shtsExcelNew = CreateObject("Excel.Sheet")
Set shtsExcelDiff = CreateObject("Excel.Sheet")
strDSAbnBl = shtsExcelNew(1).Cells(3, 7).Text --- I get Error 438 in this line
end sub
I tried changing it to range("G3").value but it didn't help.
can someone point me where am i doing it wrong ?