Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default .XLA versus XLS sheet code

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default .XLA versus XLS sheet code

The easiest way would be to use application level events in the
XLA. See http://www.cpearson.com/excel/AppEvent.htm for more
info.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"ndalal" wrote in message
oups.com...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default .XLA versus XLS sheet code

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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you PDF an entire Excel workbook versus one sheet at a time K2FL Excel Discussion (Misc queries) 2 August 8th 08 08:18 PM
Chart versus Work Sheet Code Failure Nigel Excel Programming 2 April 18th 05 05:16 PM
XLA versus Reference versus Nothing Jos Vens[_2_] Excel Programming 2 April 11th 05 08:54 AM
R1C1 versus A1 in VB code Bill Sturdevant[_2_] Excel Programming 8 January 27th 05 03:03 PM
Sheet Code Module: copying code to [email protected][_2_] Excel Programming 2 December 14th 04 01:57 AM


All times are GMT +1. The time now is 09:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"