Questions upon opening workbooks

E

E. Edgington

I am using VBA that copies all worksheets from several
workbooks into one workbook. Problem is, Excel asks me
about ten questions before the code is finished. Is
there a way to make VB answer these questions so the end
user never sees them?

The actual questions/statements are:

1. A formula or sheet you want to move or copy contains
the same name 'NvsEndTime', which already exists on the
destination worksheet. Do you want to use this version of
the name? Y/N

2. The workbook you opened contains automatic links to
information in another workbook. Do you want to update
this workbook with changes made to the other workbook? Y/N

3. The selected sheet(s) will be permanently deleted.
OK/Cancel

As always, thanks for your help! You guys are AWESOME!
 
B

Bob Phillips

Try preceding your code with

Application.DisplayAlerts = False

and reset to True after.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
G

Guest

Thank you - this took care of problems #1 & 3, and I was
able to use the same idea to solve problem #2 - I found
Application.AskToUpdateLinks.

Thanks again!
 

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