.XLA versus XLS sheet code

N

ndalal

Hi,

I have an XLA add in which has menu item to insert new sheet. This
sheet gets inserted to the XLS project. The code behind inserting this
sheet resides in XLA, however I want to perform "worksheet_change" kind
of function for this new sheet. I already have the code for
"worksheet_change" in XLA, but that does not help because the new sheet
is part of XLS.

In order to do add "worksheet_change" for the new sheet manipulation,
how do I "automatically" add the code into the new sheet from XLA ??

I was thinking of inserting/copying the "worksheet_change" code from
XLA to this newly generated sheet in XLS. But how? Any ideas, clues?

Any help is appreciated.
Thanks in advance.

- Andy
 
N

ndalal

I am not sure if I made my question clear..so here it goes......

XLA - add-in to insert sheet (name: foo) - this generates new sheet and
adds it to the XLS file (VBA project). This XLS file is not fixed.
Anybody can open their own XLS file and addin XLA to it.

XLS - sheet "foo" is inside this workbook. Now I would like to add code
for "worksheet_change" behind this sheet. Since this XLS (VBA project)
is not under my control, I cannot edit this XLS.

So I am trying to insert the code dynamically from XLA to the sheet in
XLS during the function call to insert sheet (XLA) by any user. And
thats where I am stucked.

Thanks for the help.
 

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