开发者

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

开发者 https://www.devze.com 2023-02-11 15:55 出处:网络
I want to use the UDF in excel template(.xlt) I have used Application.OnKey(\"^v\",\"MyFunction\");i want to use separate func开发者_StackOverflowtion when user paste the the cell in excel i.e. MyFuct

I want to use the UDF in excel template(.xlt) I have used Application.OnKey("^v","MyFunction");i want to use separate func开发者_StackOverflowtion 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..


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

0

精彩评论

暂无评论...
验证码 换一张
取 消