Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default SheetCalculate (F9) does not reach the excel-addin

Hi,
i have a problem with an addin.
the sheetCalculate-event won't be fired for the add-In, so the code in the
event handler of the add-inn won't be started...

few more infos:
- Other events like WorkbookActivate will be fired for the add-in
- sheetCalculate will be fired for the active workbook (only for testing,
there is no code
- no other add-inns are started

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default SheetCalculate (F9) does not reach the excel-addin

Sheet calculate would not fire for the add-in as that is not the active
sheet.

Why are you having calculations in the add-in, not on the target worksheet?
Perhaps you could re-design to remove it from the add-in.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"kikde" wrote in message
...
Hi,
i have a problem with an addin.
the sheetCalculate-event won't be fired for the add-In, so the code in the
event handler of the add-inn won't be started...

few more infos:
- Other events like WorkbookActivate will be fired for the add-in
- sheetCalculate will be fired for the active workbook (only for testing,
there is no code
- no other add-inns are started



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default SheetCalculate (F9) does not reach the excel-addin

You can try to fire the sheetCalculate event via another event.
There are two main reasons why you would want to re-calculate in your add-in:
1. At the beginning of your process - therefore you could fire a manual
calculate inside the WorkbookActivate event.
2. During processing - this means you have changed a cell value in the addin
sheet and wish to recalculate based on the new cell value. Since an addin is
usually hidden, this should mean that you know which cell changed. Therefore
you can use the Workbook_SheetChange event to include a manual recalculation
code.

Kind Regards,
Antonio Elinon

"kikde" wrote:

Hi,
i have a problem with an addin.
the sheetCalculate-event won't be fired for the add-In, so the code in the
event handler of the add-inn won't be started...

few more infos:
- Other events like WorkbookActivate will be fired for the add-in
- sheetCalculate will be fired for the active workbook (only for testing,
there is no code
- no other add-inns are started

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 968
Default SheetCalculate (F9) does not reach the excel-addin

When you press F9 Excel does a Recalculate of all open workbooks, not a
Sheet calculate: did you mean Shift-F9 (recalculates all selected sheets)?
If so then Shift-F9 will not trigger a recalc of sheets in an addin because
the sheets will not be selected.

Why do you think that pressing F9 will not trigger a recalc of sheets in an
addin? It does trigger a recalc of addin sheets in my system: try adding a
volatile function to a sheet in your addin and putting some code
(debug.print "Hello") in the worksheet_calculate sub of that sheet. You will
see "Hello" in the immediate pane every time you press F9.

regards
Charles
______________________
Decision Models
FastExcel 2.1 now available
www.DecisionModels.com


"kikde" wrote in message
...
Hi,
i have a problem with an addin.
the sheetCalculate-event won't be fired for the add-In, so the code in the
event handler of the add-inn won't be started...

few more infos:
- Other events like WorkbookActivate will be fired for the add-in
- sheetCalculate will be fired for the active workbook (only for testing,
there is no code
- no other add-inns are started



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default SheetCalculate (F9) does not reach the excel-addin

the problem is: if have code in the sheetcalculate event of the addIn!
if i have a active workbook and press F9, this event handler should be
raised. but it won't, only the sheetcalculate of the active workbook will be
called.

"kikde" wrote:

Hi,
i have a problem with an addin.
the sheetCalculate-event won't be fired for the add-In, so the code in the
event handler of the add-inn won't be started...

few more infos:
- Other events like WorkbookActivate will be fired for the add-in
- sheetCalculate will be fired for the active workbook (only for testing,
there is no code
- no other add-inns are started



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default SheetCalculate (F9) does not reach the excel-addin

If the code in the sheetcalculate of the active workbook is yours, then
revise this to add a direct call to the sheetcalculate of the addin.

If it is not yours to revise, then it is not possible as the add-in has no
way of knowing about the active workbook recalculation. The only way it can
know, is if the addin can insert code on-the-fly into the active workbook
(and every workbook that becomes active.)

A simple suggestion is to program an Alt-key combination that will
recalculate the active workbook and recalculate the addin.

Regards,
Antonio Elinon


"kikde" wrote:

the problem is: if have code in the sheetcalculate event of the addIn!
if i have a active workbook and press F9, this event handler should be
raised. but it won't, only the sheetcalculate of the active workbook will be
called.

"kikde" wrote:

Hi,
i have a problem with an addin.
the sheetCalculate-event won't be fired for the add-In, so the code in the
event handler of the add-inn won't be started...

few more infos:
- Other events like WorkbookActivate will be fired for the add-in
- sheetCalculate will be fired for the active workbook (only for testing,
there is no code
- no other add-inns are started

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 968
Default SheetCalculate (F9) does not reach the excel-addin

Worksheet.Calculate only gets called after a sheet is recalculated: Add a
volatile function ( for example =Time()) to the worksheet in your addin to
make it recalculate at each application recalculation..

or use application level events to trap the calculate event. This is more
complex: see Chip Pearson's site
http://www.cpearson.com/excel/AppEvent.htm


HTH
Charles
______________________
Decision Models
FastExcel 2.1 now available
www.DecisionModels.com

"kikde" wrote in message
...
the problem is: if have code in the sheetcalculate event of the addIn!
if i have a active workbook and press F9, this event handler should be
raised. but it won't, only the sheetcalculate of the active workbook will
be
called.

"kikde" wrote:

Hi,
i have a problem with an addin.
the sheetCalculate-event won't be fired for the add-In, so the code in
the
event handler of the add-inn won't be started...

few more infos:
- Other events like WorkbookActivate will be fired for the add-in
- sheetCalculate will be fired for the active workbook (only for testing,
there is no code
- no other add-inns are started



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
Excel how to be alerted when cells reach preset number? EA Excel Worksheet Functions 1 November 20th 07 07:00 PM
short cut to reach a sheet jph Excel Discussion (Misc queries) 2 June 26th 06 03:49 PM
Sum of row until you reach a certain amount Andman Excel Discussion (Misc queries) 3 March 25th 05 06:51 AM
Remove Excel AddIn from AddIn List !! Help carl Excel Programming 2 December 8th 03 03:36 PM
Problem with SheetCalculate Event Jim Rech Excel Programming 3 November 6th 03 02:08 PM


All times are GMT +1. The time now is 03:16 PM.

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"