Triggering events on excel objects (ex: Buttons) with vb net
Triggering events on excel objects (ex: Buttons) with vb net
Triggering events on excel objects (ex: Buttons) with vb net
Triggering events on excel objects (ex: Buttons) with vb net
Triggering events on excel objects (ex: Buttons) with vb net
Triggering events on excel objects (ex: Buttons) with vb net Triggering events on excel objects (ex: Buttons) with vb net Triggering events on excel objects (ex: Buttons) with vb net Triggering events on excel objects (ex: Buttons) with vb net Triggering events on excel objects (ex: Buttons) with vb net Triggering events on excel objects (ex: Buttons) with vb net Triggering events on excel objects (ex: Buttons) with vb net Triggering events on excel objects (ex: Buttons) with vb net
Triggering events on excel objects (ex: Buttons) with vb net Triggering events on excel objects (ex: Buttons) with vb net
Triggering events on excel objects (ex: Buttons) with vb net
Go Back  Xtreme Visual Basic Talk > > > Triggering events on excel objects (ex: Buttons) with vb net


Reply
 
Thread Tools Display Modes
  #1  
Old 05-05-2010, 02:37 PM
7h0m's Avatar
7h0m 7h0m is offline
Regular
 
Join Date: Feb 2008
Posts: 64
Question Triggering events on excel objects (ex: Buttons) with vb net


Hi!

I am using vb .net and office 2007 with Microsoft.Office.Interop.Excel.Application loaded in a vb net project.

I have this excel file filled with buttons and drop down objects... i need to change the value of the drop downs and then click a button, all this inside vb .net.

I have my workbooks, sheets and ranges all setup, i just need a headstart to, for example, change a drop down value, to say... item number 2.

any Tuts or code samples?

Thanks!
__________________
Nasa predicts Pole Shift in 2012. Google it.
Reply With Quote
  #2  
Old 05-06-2010, 01:05 PM
Mike Rosenblum's Avatar
Mike Rosenblum Mike Rosenblum is offline
Microsoft Excel MVP

Forum Leader
* Guru *
 
Join Date: Jul 2003
Location: New York, NY, USA
Posts: 7,848
Default

Hi 7h0m,

This is a bit complicated to do from .NET. The pure .NET approach here would be to use Visual Studio Tools for Office (VSTO). Using VSTO would allow you to use .NET controls on the forms. However, VSTO can only be used for Excel 2003 and above and has some complicated deployment scenarios.

The standard ActiveX controls are designed to be accessed via VBA, not via .NET. But it can be done. See:

(1) Hooking ActiveX MSForms.CommandButton Event on a Worksheet from .NET

(2) Referencing an ActiveX MSForms.TextBox on a Worksheet from .NET

Lastly, the Forms controls cannot be accessed programmatically at all, but don't need to be, since they do all their linking with Excel cells. Because the Forms controls do not require programmatic access, these are often the easiest and best way to go.

Hopefully this can help get you started. Let me know if you need more info on any of these techniques...

- Mike
__________________
My Articles:
| Excel from .NET | Excel RibbonX using VBA | Excel from VB6 | CVErr in .NET | MVP |
Avatar by Lebb
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Triggering events on excel objects (ex: Buttons) with vb net
Triggering events on excel objects (ex: Buttons) with vb net
Triggering events on excel objects (ex: Buttons) with vb net Triggering events on excel objects (ex: Buttons) with vb net
Triggering events on excel objects (ex: Buttons) with vb net
Triggering events on excel objects (ex: Buttons) with vb net
Triggering events on excel objects (ex: Buttons) with vb net Triggering events on excel objects (ex: Buttons) with vb net Triggering events on excel objects (ex: Buttons) with vb net Triggering events on excel objects (ex: Buttons) with vb net Triggering events on excel objects (ex: Buttons) with vb net Triggering events on excel objects (ex: Buttons) with vb net Triggering events on excel objects (ex: Buttons) with vb net
Triggering events on excel objects (ex: Buttons) with vb net
Triggering events on excel objects (ex: Buttons) with vb net
 
Triggering events on excel objects (ex: Buttons) with vb net
Triggering events on excel objects (ex: Buttons) with vb net
 
-->