Creating functions for excel in Visual Studio 2010
In old excel visual basic it was easy to create and use a function. You create a function in Vb:
public function testing() testing = "this is the result" end function
Then in excel you put "=testing()" in your cell.
In Visual Studio 2010 I am creating a new Excel Workb开发者_高级运维ook project, putting the functions code into Sheet1.vb and saving.
But in 2010 excel sheet my function is not showing up. I tried putting the code into the VisaulBaseic of the spreadsheet with the same null result.
Incredibly to me I cant find a simple example of this in the whole web, hence this call for help.
Are there new steps I am missing?
Regards
Here are a couple of links that will walk you through the steps you need to perform. Pretty straightforward, worked fine for me. Give it a try.
Walkthrough: Calling Code from VBA in a Visual Basic Project
Microsoft Office Excel Programming Using VSTO 3.0
精彩评论