Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I created a Excel Shared AddIn in C#.Net and register my custom funciton with Excel like this. [ClassInterface(ClassInterfaceType.AutoDual)] public class RegisterFunctions { [ComRegisterFunction()] public static void RegisterCustomFunction(System.Type type) { Registry.ClassesRoot.CreateSubKey(GetSubKeyName(ty pe)); } [ComUnregisterFunction()] public static void UnregisterFunction(System.Type type) { Registry.ClassesRoot.DeleteSubKey(GetSubKeyName(ty pe)); } public static string GetSubKeyName(System.Type type) { string s1; s1 = @"CLSID\{" + type.GUID.ToString().ToUpper() + @"} \Programmable"; return s1.ToString(); } public object FINValue(string tic, string mic) { //Now this function call DB and using "tic" and "mic", pull the relevant numeric value and return it. } This is working perfectly. Now I have few more requirements. 1. I have added a Custom Toolbar button "Enable/Disable FINValue function" and want to enable/disable call (function) accordingly. Disable mean, function will not call DB and preserve previous value even user press Ctrl + Shift + ENTER (or referesh the sheet). 2. If user has 100 functions on one sheet and the press Ctrl + Shift + ENTER (or referesh the sheet) it take significant time (in seconds). I am working with Local database (SQL Server 2005) and it does not take too much time. How should I improve performance in this scenario? Your prompt reply will be really appreciated. Thanks Best Regards, Malik Irfan |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
setup project for Excel addin, won't register addin | Excel Programming | |||
Add DropDown at Runtime Visual Studio Shared AddIn | Excel Programming | |||
Removing an Addin from the Tools Addin list. | Excel Programming | |||
Unshimmed Automation Addin and Shimmed COM Addin in same App Domai | Excel Programming | |||
Remove Excel AddIn from AddIn List !! Help | Excel Programming |