Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Event to call before a opened workbook is recalculated

Hi

I have a add-in that defines a number of functions. When a user uses them
and saves a workbook When the user loads the workbook again I need to be
able to write some information to a dll before Excel recalculate the sheet.
At the moment the code is in the event WorkbookOpen but that is to late.

Can anyone tell me if there is a event that I can call before any
calculations are done?

Thanks Torben Laursen


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Event to call before a opened workbook is recalculated

Hi
AFAIK the workbook open event is the first event which is called

--
Regards
Frank Kabel
Frankfurt, Germany
"Torben Laursen" schrieb im Newsbeitrag
...
Hi

I have a add-in that defines a number of functions. When a user uses them
and saves a workbook When the user loads the workbook again I need to be
able to write some information to a dll before Excel recalculate the
sheet. At the moment the code is in the event WorkbookOpen but that is to
late.

Can anyone tell me if there is a event that I can call before any
calculations are done?

Thanks Torben Laursen



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Event to call before a opened workbook is recalculated

Hi Frank

Thanks
But my userdefined functions are called before the workbookopen event.
Is there a way so I can execute some code before they are called?

Thanks Torben Laursen


"Frank Kabel" wrote in message
...
Hi
AFAIK the workbook open event is the first event which is called

--
Regards
Frank Kabel
Frankfurt, Germany
"Torben Laursen" schrieb im Newsbeitrag
...
Hi

I have a add-in that defines a number of functions. When a user uses them
and saves a workbook When the user loads the workbook again I need to be
able to write some information to a dll before Excel recalculate the
sheet. At the moment the code is in the event WorkbookOpen but that is to
late.

Can anyone tell me if there is a event that I can call before any
calculations are done?

Thanks Torben Laursen





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default Event to call before a opened workbook is recalculated

You can try this. It is a excel file that opens another excel file in a
seperate instance of Excel. You can fire whatever you want from here before
the workbok ever opens...

Option Explicit
Private Const m_strPath As String = "C:\Documents and
Settings\jamest\Desktop\Budget 2004\"
Private Const m_strFileName As String = "TestTemplate.xls"


Sub Auto_Open()
Dim appXL As Excel.Application
Dim wbk As Workbook

Set appXL = CreateObject("Excel.Application.9")
appXL.Visible = True
Set wbk = appXL.Workbooks.Open(m_strPath & m_strFileName)
wbk.RunAutoMacros xlAutoOpen
ThisWorkbook.Close SaveChanges:=False
End Sub

"Torben Laursen" wrote:

Hi Frank

Thanks
But my userdefined functions are called before the workbookopen event.
Is there a way so I can execute some code before they are called?

Thanks Torben Laursen


"Frank Kabel" wrote in message
...
Hi
AFAIK the workbook open event is the first event which is called

--
Regards
Frank Kabel
Frankfurt, Germany
"Torben Laursen" schrieb im Newsbeitrag
...
Hi

I have a add-in that defines a number of functions. When a user uses them
and saves a workbook When the user loads the workbook again I need to be
able to write some information to a dll before Excel recalculate the
sheet. At the moment the code is in the event WorkbookOpen but that is to
late.

Can anyone tell me if there is a event that I can call before any
calculations are done?

Thanks Torben Laursen






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 968
Default Event to call before a opened workbook is recalculated

You could either switch to manual before the workbook is opened, or
(probably safer) have a global switch which causes your UDFs to do nothing
unless the information has been written to the dll and then recalculate once
you have written the information to the dll.

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

"Torben Laursen" wrote in message
...
Hi Frank

Thanks
But my userdefined functions are called before the workbookopen event.
Is there a way so I can execute some code before they are called?

Thanks Torben Laursen


"Frank Kabel" wrote in message
...
Hi
AFAIK the workbook open event is the first event which is called

--
Regards
Frank Kabel
Frankfurt, Germany
"Torben Laursen" schrieb im Newsbeitrag
...
Hi

I have a add-in that defines a number of functions. When a user uses
them and saves a workbook When the user loads the workbook again I need
to be able to write some information to a dll before Excel recalculate
the sheet. At the moment the code is in the event WorkbookOpen but that
is to late.

Can anyone tell me if there is a event that I can call before any
calculations are done?

Thanks Torben Laursen







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
Event when a formula is recalculated? Gunti Excel Discussion (Misc queries) 2 December 18th 08 12:37 PM
how to call the event of other worksheet chad Excel Worksheet Functions 1 May 30th 07 09:48 AM
Excel Charts do not update when workbook recalculated duane Excel Discussion (Misc queries) 1 December 29th 05 02:11 PM
Excel Charts do not update when Workbook recalculated duane Charts and Charting in Excel 0 December 27th 05 10:55 PM
how to call a macro from a worksheet event? lopsided[_3_] Excel Programming 5 December 16th 03 10:28 AM


All times are GMT +1. The time now is 03:41 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"