2021年5月7日星期五

dealing with excel "Save Changes" pop up opening in another instance and halting my code

I had this Issue a while back [VBA Code stops when "Save changes" dialog pop up ][1] The answer I got to that question did not work as expected.

essentially what i'm trying to do is to pull some data from SAP Using VBA. Only problem is the extracted data open automatically in another excel instance and the "Save Changes" pop up window appears, so the code stops until I close it.

solutions I tried and did not work include:

  • Using AutoClose or AutoOpen subs in the excel template. I think the reason is the SAP program is the one telling excel to quit.
  • Using VBS to sendkey "OK" or "cancel" after it appears, which did not work also.

I have searched every where for a solution and I did not find my answer yet. [1]: Simulate button Cancel on Excel "Save changes" pop up

https://stackoverflow.com/questions/67443553/dealing-with-excel-save-changes-pop-up-opening-in-another-instance-and-halting May 08, 2021 at 10:33AM

没有评论:

发表评论