问题
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