Answering an Excel generated msg box Yes

D

Darin Kramer

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
 
B

Bob Phillips

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top