?
Solved

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

Posted on 2012-03-31
4
Medium Priority
?
340 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:Murray Brown
[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:Murray Brown
ID: 37797585
Hi. Yes it is.
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 2000 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:Murray Brown
ID: 37803524
thanks for the help
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

650 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