Solved

VB.net Excel Add-in Running a procedure behind a UserControl from a button on the ribbon

Posted on 2012-03-31
4
333 Views
Last Modified: 2012-04-03
Hi

I need to run the following procedure "Test" behind UserControl1 (a Custom Task Pane)
from a button click on my Ribbon. How do I do this? I tried changing the code below to "Public Shared Sub Test" but got the error: "Me is not valid within an instance method"

Public Class UserControl1

        Public  Sub Test
               Me.TreeView1.Nodes.Clear.........
.
0
Comment
Question by:murbro
  • 2
  • 2
4 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 37795491
Is treeview1 on the user control?
0
 

Author Comment

by:murbro
ID: 37797585
Hi. Yes it is.
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 37802177
You need to have a reference of the user control in your button. Not sure where you can get that. At class level somewhere.
0
 

Author Closing Comment

by:murbro
ID: 37803524
thanks for the help
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question