IMHO, the OP code will definitely not work.
you Activate the External prog, yes.
But also use "worksheet", which will then shift focus to
your Workbook/worksheet.

you must first gather all info to the variable, then
set focus on the external prog and do the Sendkeys.

also, there are times that simple AppActive will not
activate the app, you need to "find" the window handler
of the app and put that window handler in the "foreground".