excel - Add-in SelectChange() event -


i created add-in has user form. in user form have display info selected cell, when add selectchange() event works, when create add-in version doesn't work because add in "has own workbook", select change working in add-in file , not in active workbook or worksheet... so, right? there way use selectchange() event in add-in reads info active sheet?

something this, not tested

public withevents objexcel excel.application public withevents objwb excel.workbook  private sub workbook_open()     set objexcel = application     set objwb = activeworkbook end sub  private sub objexcel_newworkbook(byval wb workbook)     set objexcel = application     set objwb = wb end sub  private sub objws_sheetselectionchange(byval sh object, byval target range)     msgbox target.address end sub 

Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -