Solved

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

Posted on 2012-03-31
4
335 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
"Emulate" TAB key when press Enter Key 3 90
Access/Visual Basic Question 3 47
Find date of 2nd Thursday of each month 3 42
Need Help With GDI+ in VB.Net 8 34
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

738 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