PopUp message if Layer exists already

Discussion created by flederfauz on May 20, 2011
Latest reply on May 20, 2011 by Dan_Patterson

I ve a Code to generate some new layer. So if I save this layer I check if it already exists. If it does I d like to pop up a message window "Layer exists allready. Do you want to replace Layer xyz" and than I d like to have a YES and a NO button and continue the Code based on the user s  choice.

Is there anyway to do this?

Best Regards