ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   XLapp and Linking an addin ThisWorksheet to run multiple times (https://www.excelbanter.com/excel-programming/279199-xlapp-linking-addin-thisworksheet-run-multiple-times.html)

strataguru[_7_]

XLapp and Linking an addin ThisWorksheet to run multiple times
 
Hi,

I have a number of macros that I have embedded in my addin in the
ThisWorksheet of the addin.

A few of the macros inside ThisWorksheet monitor the SheetChange with
the XLapp functionality.

So - when my workbook opens - the XLapp is pulled in:

Private Sub Workbook_Open()
Set XLapp = Application
End Sub

This works fine on the first execution of any macro.... for example - a
macro that updates a few cells - which then invokes the
XLapp_SheetChange - which causes a few cells to update.

The next time I try running a macro - the XLapp_SheetChange doesn't get
kicked off. It's like the link between the addin and my workbook has
been disconnected.

I even tried manually putting the statement:
Set XLapp = Application

at the tail of my macro in ThisWorkbook - but that doesn't help.
Any ideas?
Thanks,
Robin



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/



All times are GMT +1. The time now is 04:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com