how to use Application.OnKey by C# without involving VBA code?

一个人想着一个人 提交于 2019-12-10 17:42:23

问题


I want to use the UDF in excel template(.xlt) I have used Application.OnKey("^v","MyFunction");i want to use separate function when user paste the the cell in excel i.e. MyFuction but when i defined function with in the thisworkbook.cs i wont work...

Thanks in advance..


回答1:


This won't work. You need to define the function in VBA and call you .NET method from that VBA function, like explained here at the end: http://msdn.microsoft.com/en-us/magazine/cc163373.aspx



来源:https://stackoverflow.com/questions/5040271/how-to-use-application-onkey-by-c-sharp-without-involving-vba-code

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!