VB.NET and Excel
VB.NET and Excel
VB.NET and Excel
VB.NET and Excel
VB.NET and Excel
VB.NET and Excel VB.NET and Excel VB.NET and Excel VB.NET and Excel VB.NET and Excel VB.NET and Excel VB.NET and Excel VB.NET and Excel
VB.NET and Excel VB.NET and Excel
VB.NET and Excel
Go Back  Xtreme Visual Basic Talk > > > VB.NET and Excel


Reply
 
Thread Tools Display Modes
  #1  
Old 08-31-2007, 10:37 PM
abrowne abrowne is offline
Newcomer
 
Join Date: Aug 2007
Posts: 2
Default VB.NET and Excel


Hi,

I would like to have a button within Excel with VB.NET 2.0 to refresh a Pivot Table (or do anything). I do not want to use VSTO as I would like this to be compatible with Excel 2000+.

The user click the button within Excel and the Refresh method on the Pivot Table would be called. Or even more basic, just click the button and an excel range is created.

Any assistance with pointing me in the right direction would be greatly appreciated.

thanks,
-Aaron
Reply With Quote
  #2  
Old 09-01-2007, 08:00 AM
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 Aaron,

Welcome to the forum.

For Automation tasks (that is, controlling Execl remotely from a stand-alone EXE) you should probably have a look at the Automating Office Programs with VB.NET tutorial to get you started on the basics.

It does sound like, however, that you would nat this to be an add-in for Excel itself. For that, I would start by reading How To Build an Office COM Add-in by Using Visual Basic .NET (MSDN).

I hope this gets you going, let us know if there is anything else we can do to help...

Mike
__________________
My Articles:
| Excel from .NET | Excel RibbonX using VBA | Excel from VB6 | CVErr in .NET | MVP |
Avatar by Lebb
Reply With Quote
  #3  
Old 09-01-2007, 10:00 AM
abrowne abrowne is offline
Newcomer
 
Join Date: Aug 2007
Posts: 2
Default

Thanks Mike.

You have lots of great posts on this forum.

I read your office automation post, but unless I am missing something, I do not think that is what I want. Essentially, I want functionality very similar to VBA where I put a button on a worksheet and have a task performed upon the OnClick button event.

I had done something similar to this before with VSTO 2003, but the requirement was Excel Professional 2003 for the end user.

I will look at the COM Add-In article.

thanks again Mike,
-Aaron
Reply With Quote
  #4  
Old 09-01-2007, 10:57 AM
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

Yes, I do think that the How To Build an Office COM Add-in by Using Visual Basic .NET (MSDN) article is what you are looking for. Let us know if that does the trick for you, I can suggest many others, but I think that this one is the best one to start with.

Let us know how it goes...
__________________
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
VB.NET and Excel
VB.NET and Excel
VB.NET and Excel VB.NET and Excel
VB.NET and Excel
VB.NET and Excel
VB.NET and Excel VB.NET and Excel VB.NET and Excel VB.NET and Excel VB.NET and Excel VB.NET and Excel VB.NET and Excel
VB.NET and Excel
VB.NET and Excel
 
VB.NET and Excel
VB.NET and Excel
 
-->