Solved

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

Posted on 2012-03-31
4
326 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

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 …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

743 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now