Folks:
I’ve spent hours researching this issue before posting here.
I’m trying to create a sort macro in BASIC. The script works when I specify the cells manually but data may be added to the sort range, so it must be able to determine the last row/column. The issue is when creating the sort range. I’ve used the function below to select all the data but the 1st two rows are headers, so I need to exclude them from the sort range.
Function getUsedRange(oSheet)
Dim oCursor
oCursor = oSheet.createCursor()
oCursor.gotoStartOfUsedArea(False)
oCursor.gotoEndOfUsedArea(True)
getUsedRange = oCursor
End Function
How do I specify the 1st range as a named cell and replace the “oCursor.gotoStartOfUsedArea(False)” line?
Thanks
Peace and blessings,
JQ