XLapp and SheetChange

S

strataguru

Hi,

I am just learning about the XLapp functionality - and have been trying
to use this in my addin.

The problem I have is that I have a sheet setup macro that creates a
number of sheets, formats them, and creates column headings. Everytime
a sheet is updated - the XLapp_SheetChange is called.

Problem is that I have one sheet that I want the XLapp_SheetChange to
recognize and 'do' things - but I don't want it to do things when the
setup macro is running.

Is there a way in the XLapp_SheetChange I can tell that the setup macro
is being executed?

Thanks!
 
T

Tom Ogilvy

You could possibly set some type of public variable, but probably better
would be to disable events in your setup macro

Public Sub Setup()

On Error goto ErrHandler

Application.EnableEvents = False

' code

' do not use Exit Sub
' always end going through the error handler


ErrHandler:
Application.EnableEvents = True

End Sub
 

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