I've written a code that overwrites an existing file each time it runs. Is there anyway to write the code so that the attached pop up box gets answered "Yes" and the code keeps running?
Capture.JPG
I've written a code that overwrites an existing file each time it runs. Is there anyway to write the code so that the attached pop up box gets answered "Yes" and the code keeps running?
Capture.JPG
No tested.
change the text to suit your need.
![]()
Please Login or Register to view this content.
Thank you but this didn't work as expected. When the macro runs and the "Do you want to replace it?" message box pops up on its own, I want the macro to automatically "reply" Yes and move on. So I guess the question is, is there coding that will answer Yes to any and all pop ups that happens during a macro's entire run through?
That is a standard Excel warning that you (or the code) is about to do something destructive. You can suppress those messages by adding a line of code before you do whatever ...You should restore the setting to True immediately after saving the file and you should also look into adding error handling so that the setting is not left turned off if there should be any error saving the file.![]()
Please Login or Register to view this content.
Im going to go with the following coding which does what I need it to do
![]()
Please Login or Register to view this content.
I didnt see this before posting. Thank you!!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks