If you are going to be controling other apps through sendkeys and appactivate be sure to also include the sleep lib

Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

and use liberal amounts of sleep and doevents.