help please

  • Thread starter shraddha.mitragotri
  • Start date
S

shraddha.mitragotri

Hello All,

I want to develop an Add-in for Excel 2003 using vb.net 2005. I have
tried a lot. Some how I am not able to successfully develop it.

Could you please provide me any sample application with a simple Add-in
(eg. to add first 2 cells and print in the 3rd.). This will be just a 5
min job for an experienced coder.

I have a lot of stuff for study. I am also trying my best.

Please help me. Please.....

Thanks you.

Shraddha
 
X

XL-Dennis

Hi,

You can check out my 9 article collection on how to create a shimmed managed
Add-in for Excel: http://www.excelkb.com/article.aspx?id=10204

In order to understand Excel's object is actually to use the macro recorder
in Excel. It produce some unnecessary code but it's a start.

Post back with more specific questions and I believe we can give You an
helping hand.

---------------
With kind regards,
Dennis
Weekly Blog .NET & Excel: http://xldennis.wordpress.com/
My English site: http://www.excelkb.com/default.aspx
My Swedish site: http://www.xldennis.com/
 
A

Andrei Smolin

Shraddha,

Have a look at Add-in Express .NET
(http://www.add-in-express.com/add-in-net/). It can save your time in
COM Add-in development. Free sample add-ins with source code are
available at http://www.add-in-express.com/free-addins/.

As to your question:
===
Imports System.Runtime.InteropServices
Imports Excel = Microsoft.Office.Interop.Excel

....

Private Sub AdxCommandBarButton1_Click(ByVal sender As
System.Object) Handles AdxCommandBarButton1.Click
Dim Sheet As Excel.Worksheet = CType(Me.ExcelApp.ActiveSheet,
Excel.Worksheet)
If Sheet Is Nothing Then Exit Sub
Dim Range1 As Excel.Range = Sheet.Range("A1")
Dim Range2 As Excel.Range = Sheet.Range("A2")
Dim Range3 As Excel.Range = Sheet.Range("A3")
Dim Range4 As Excel.Range = Sheet.Range("A4")

Range3.Formula = "=" + Range1.Address + " + " + Range2.Address
Range4.Value = Range1.Value + Range2.Value

Marshal.ReleaseComObject(Range1)
Marshal.ReleaseComObject(Range2)
Marshal.ReleaseComObject(Range3)
Marshal.ReleaseComObject(Range4)
Marshal.ReleaseComObject(Sheet)
End Sub
===
Andrei Smolin
Add-in Express Team Leader
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top