Libre office need help with macro

I have an old Macro and in latest Libre office
it does not work anymore

anyone can help debug this Macro so it can work in latest LibreOffice CALC

thanks for any feedback
happy bl