Suppressing a message box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a sub that monitors changes to the spreadsheet and when a value in a
cell in the range A1:A10 is deleted a default value is entered. A message
box then appears informing the user of the default value.
If a user right-clicks in that range, a menu appears to add/delete. If the
user chooses add, an input box appears for them to add a name (or names
separated by commas). This launches a procedure that inserts a new row and
then places the name entered as the value for the cell. This repeats for all
names entered in the input box.
When the row is added, the first sub kicks in and enters the default value
then displays the message box. When the user clicks ok, the new value is
then entered. Is there a way to bypass or suppress the message box?
 
application.EnableEvents = False
' code that adds rows and so forth
Application.EnableEvents = True
 

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