I don't know if anyone is still working on/with this UDF, but I find it a work of art and use it constantly. Thank you.
I do seem to get unusual results from the _ExcelUsedRangeGet function. I've read that using the SpecialCells method is unreliable, and have had better results doing something like this (returning the array in the same format.) Anyone?
Func _ExcelSheetUsedRangeGet2($oExcel, $vSheet)
Local $aSendBack[4], $sTemp, $aSheetList, $fFound = 0
If NOT IsObj($oExcel) Then Return SetError(1, 0, 0)
If IsNumber($vSheet) Then
If $oExcel.ActiveWorkbook.Sheets.Count < $vSheet Then Return SetError(2, 0, 0)
Else
$aSheetList = _ExcelSheetList($oExcel)
For $xx = 1 To $aSheetList[0]
If $aSheetList[$xx] = $vSheet Then $fFound = 1
Next
If NOT $fFound Then Return SetError(3, 0, 0)
EndIf
$oExcel.ActiveWorkbook.Sheets($vSheet).Select
$TempR = $oExcel.Cells.Find('*', $oExcel.Cells(1, 1), Default, Default, $xlByRows, $xlPrevious).Row
$TempC = $oExcel.Cells.Find('*', $oExcel.Cells(1, 1), Default, Default, $xlByColumns, $xlPrevious).Column
$aSendBack[0] = $oExcel.Cells($TempR, $TempC).Address
$aSendBack[1] = "R" & $TempR & "C" & $TempC
$aSendBack[0] = StringReplace($aSendBack[0], "$", "")
$aSendBack[2] = $TempC
$aSendBack[3] = $TempR
If $aSendBack[0] = "A1" And $oExcel.Activesheet.Range($aSendBack[0]).Value = "" Then $aSendBack[0] = 0
Return $aSendBack
EndFunc ;==>_ExcelSheetUsedRangeGet