473,383 Members | 1,868 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

excel with vb.net

Dear all,

I would like to use excel and vb.net to create a report(xml) generator,
however, i wouldnt find any source for making shapes(button,label) from
vb.net to initial excel
what i want to know is how can i get the actionlistener of a button,
which the coding is made in VB.Net but the button is added on a
spreadsheet
i think i have store the object reference of that button
but using onAction is not possible since i want control the
actionlistenre in my Vb.net, is it possible??

Thank and regards,
Jake

Nov 21 '05 #1
4 1867
Jake,

In my opinion do you have to decide where your action (your button) is. It
is either in a windowforms and than you can use VBNet or it is on your
spreadsheet and than you can use Excel programming.

Just my opinion.

Cor
Nov 21 '05 #2
Hi,

I don¡¦t know the exact answer to that question, but those kinds of things
seem a good candidate to use Visual Studio Tools for Office (VSTO). VSTO is
an add-on for VS.NET 2003 which allows you to build Office solutions using
..NET instead of VBA. See:

http://msdn.microsoft.com/office/understanding/vsto/

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com

<ja******@gmail.com> escribio en el mensaje
news:11*********************@o13g2000cwo.googlegro ups.com...
Dear all,

I would like to use excel and vb.net to create a report(xml) generator,
however, i wouldnt find any source for making shapes(button,label) from
vb.net to initial excel
what i want to know is how can i get the actionlistener of a button,
which the coding is made in VB.Net but the button is added on a
spreadsheet
i think i have store the object reference of that button
but using onAction is not possible since i want control the
actionlistenre in my Vb.net, is it possible??

Thank and regards,
Jake

Nov 21 '05 #3
hi,

thx u 2 guys reply
my code will based on VB.net(VS.net) only
however, i need generate so buttons on spreadsheet to make it function
well
if i use the method .onaction.....it seem i should assign a marco on
it....
doesnt it?
can i do all my stuff on vb.net only?
ie, all the action handler can only be found on vb.net

thx and regard,
Jake

Nov 21 '05 #4
to explain more clearly
i post my coding here

Private Sub ThisWorkbook_Open() Handles ThisWorkbook.Open

' Visual Basic
Dim str As String
str = "About Visual Basic"
Dim mySheet As Excel.Worksheet
Dim myRange As Excel.Range

mySheet = _
CType(Me.ThisApplication.Sheets.Item(1), _
Excel.Worksheet)

Dim sel As Excel.Button
sel = _
CType(mySheet.Buttons.Add(143.25, 83.25, 97.5, 27), _
Excel.Button)
MsgBox(11)
MsgBox(sel.Text)
sel.Text = "test"
MsgBox(sel.Text)

'do sth here!!!!

MsgBox(22)

CType(mySheet.Cells.Item(2, 2), Excel.Range).Value _
= "Hello From"
CType(mySheet.Cells.Item(3, 2), Excel.Range).Value _
= "About Visual Basic"
myRange = mySheet.Range("B2:B3")
myRange.Font.ColorIndex = 3
myRange.Font.Bold = True
myRange.Font.Size = 18
opened = True
End Sub

in the comment "do sth here!!!!"
can i add some statement to control action of button on the
spreadsheet??
just like onAction in macro...........

thx

Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Allison Bailey | last post by:
Hi Folks, I'm a brand new Python programmer, so please point me in the right direction if this is not the best forum for this question.... I would like to open an existing MS Excel spreadsheet...
6
by: Matthew Wieder | last post by:
I have the following requirements: Build a stand-alone C# application that asks the user to click in a cell in an Excel spreadsheet, and then displays the address of that cell in the C#...
14
by: pmud | last post by:
Hi, I need to use an Excel Sheet in ASP.NET application so that the users can enter (copy, paste ) large number of rows in this Excel Sheet. Also, Whatever the USER ENETRS needs to go to the...
22
by: Howard Kaikow | last post by:
There's a significant problem in automating Excel from VB .NET. Reminds me of a problem I encountered almost 3 years ago that was caused by the Norton Auntie Virus Office plug-in. Can anybody...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.