ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Answering an Excel generated msg box Yes (https://www.excelbanter.com/excel-programming/395122-answering-excel-generated-msg-box-yes.html)

Darin Kramer

Answering an Excel generated msg box Yes
 
Hi there,

I have a macro that opens multiple files (individually), copies and
pastes info into and then closes files.

Problem is when Im copying the info across I get the Excel generated
message that says "A formulae or sheet that you want to move or copy
contains the name "x" which already exists on the destination worksheet.
Do you want to use this version of the name?.. etc" Then you have the
yes no option.

I want, for the message box to automatically choose the YES option. (ie
so that the user doesnt have to click yes..)



Any ideas....?

Would it be easeier if I first copied to just another sheet in the same
book?

Thanks

D



*** Sent via Developersdex http://www.developersdex.com ***

Bob Phillips

Answering an Excel generated msg box Yes
 
Precede the code with

Application.DisplayAlerts = False

and reset afterwards

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Darin Kramer" wrote in message
...
Hi there,

I have a macro that opens multiple files (individually), copies and
pastes info into and then closes files.

Problem is when Im copying the info across I get the Excel generated
message that says "A formulae or sheet that you want to move or copy
contains the name "x" which already exists on the destination worksheet.
Do you want to use this version of the name?.. etc" Then you have the
yes no option.

I want, for the message box to automatically choose the YES option. (ie
so that the user doesnt have to click yes..)



Any ideas....?

Would it be easeier if I first copied to just another sheet in the same
book?

Thanks

D



*** Sent via Developersdex http://www.developersdex.com ***




Darin Kramer

Answering an Excel generated msg box Yes
 


Awesome Thanks!

*** Sent via Developersdex http://www.developersdex.com ***


All times are GMT +1. The time now is 12:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com