Bypass message??

  • Thread starter Thread starter Jim
  • Start date Start date
J

Jim

I have a macro which overwrites an object. When the macro is clicked
it gives a message asking if I want to replace the existing file
(Yes/No). Is there a way to have 'Yes' automatically selected and run,
thereby bypassing having to click on it everytime?

Thanks

Jim
 
Setwarnings False
.... ' your existing command(s)
SetWarnings trrue

HTH

Pieter
 
Setwarnings False
.... ' your existing command(s)
SetWarnings trrue

HTH

Pieter
 
SetWarnings to False (No in 97) does not work when export to an existing file
(Excel). SetWarnings to False works great for the other Access warnings.

Is there something else that can be done?
 
Switch to using VBA, rather than a macro. You can check whether the file
exists, and delete it if it does.

If Len(Dir(strFullPathToFile)) > 0 Then
Kill strFullPathToFile
End If
 

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

Back
Top