(I hadn’t noticed this as a duplicate in time. Thus I suspected the askbot to have killed my previous answer. Having added an attachment here, I will not delete this answer despite the fact that posting duplicates should not be encouraged.)
The ActiveCell does not occur in the LibreOffice (Calc) API as a concept. It does exist in a sense like “the cell that will be edited if F2 is pressed or if the formula bar is entered” or “the cell that has an emphasizing border in the view”. However, this cell is not assured to be in the CurrentSelection, and if it is, it may not be the topmost leftmost of any one of the single ranges contained therein.
Moreover the CurrentSelection can be multirange, and then not supporting the service “com.sun.star.sheet.SheetCellRange”, not to mention “com.sun.star.sheet.SheetCell”.
If you urgently need to work with the ActiveCell in user code, I thus would suggest you set the Option VBAsupport 1 in LibO BASIC, and use the then as-if-predefined-variable ActiveCell.
As a matter of fact I do not know application cases for this.
How to do as I suggested you may learn from this attached example.
Editing: I did not take precautions against premature calls to the included user functions. Therefore you will get errors during the recalculation OnLoadDocument. As soon as the document is completely loaded a Ctrl+Shift+F9 will call a recalculation that should work.