Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Add-in function calling problem on start
I have an VB6.0 automation add-in which has a set of functions that rea data from an xml file and return the values. These functions are calle from excel 2003 spreadsheet cells. I have one problem in that when the spreadsheet launches, it does no call the add-in functions and populate the data in the cells. I need t click on the cells and do a tab change for the functions to be calle and cells to be populated. How can I force the add-in functions to be called on the start of th spreadsheet so that it would populate the sheet with the new values. Appreciate your help -- kumar_867 ----------------------------------------------------------------------- kumar_8675's Profile: http://www.excelforum.com/member.php...fo&userid=1569 View this thread: http://www.excelforum.com/showthread.php?threadid=27255 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Add-in function calling problem on start
Hi Kumar,
I have one problem in that when the spreadsheet launches, it does not call the add-in functions and populate the data in the cells. I need to click on the cells and do a tab change for the functions to be called and cells to be populated. How can I force the add-in functions to be called on the start of the spreadsheet so that it would populate the sheet with the new values. I don't think there's an option for 'Recalc on open' for automation addin functions, which leaves three alternatives: 1. In your automation addin, implement the IDTExtensibility2 interface (or add an 'Addin' designer). In the OnConnection event, store a reference to the Excel Application object you're given, then mark each of your functions as volatile, by starting them with the statement Application.Volatile = True. This will mean that Excel calls your function every time it recalcs (including when first loading), so you'll probably also want to implement some sort of cache of the results. 2. Use a separate addin (or code in the workbook) to respond to the Workbook_Open event and force a CalculateFull when it's opened. 3. Remember to press Ctrl+Alt+F9 to update all the calcs when you open the file. Regards Stephen Bullen Microsoft MVP - Excel www.oaltd.co.uk |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Calling a function in my SQL-DB from VBA | Excel Discussion (Misc queries) | |||
Calling a function and then returning | Excel Discussion (Misc queries) | |||
calling a function | Excel Programming | |||
Function Calling Subroutine | Excel Programming | |||
problem with selection when calling macro externally from VB6 | Excel Programming |