Navigate with the keyboard in object manager arrow keys after running a macro doesn't work

Hello,

i write a macro to export selected objects.

After the macro runs it is not possible to navigate with the keyboard arrow keys to the next object in the object manager.

I have to click in the document an reselect a object, after that the keyboard-navigations works.

How can I  fix this problem ?

Thanks

Joerg