Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 286
  • Last Modified:

VB.net Running a procedure behind a Custom Task Pane user control

Hi

I have a Custom Task Pane user control shown in Image 1 below. I want to run a procedure shown in the second image. What code would I used in the AddIn startup to run this?

1
2
0
Murray Brown
Asked:
Murray Brown
  • 3
  • 2
1 Solution
 
CodeCruiserCommented:
Have you tried

Load_DataGridView()

?
0
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Hi. That doesn't work
0
 
CodeCruiserCommented:
Any errors? Can you show more code where you are calling it?
0
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Hi. Below is the code that has the variable TpSqlEditCustomTaskPane at the top that I am trying to call from any other part of the project but can't seem to.

Thanks



Public Class ThisAddIn


    Private _tpSqlEdit As TpSQLEdit
    Public TpSqlEditCustomTaskPane As Microsoft.Office.Tools.CustomTaskPane
    Private oUserControl1 As UserControl1
    Public oRightTaskPane As Microsoft.Office.Tools.CustomTaskPane

    Private Sub ThisAddIn_Startup() Handles Me.Startup
        'Fire the Custom TaskPane
        AddTpSqlEdit()
        AddSideTaskPane()
    End Sub

    Private Sub ThisAddIn_Shutdown() Handles Me.Shutdown

    End Sub

    'Create the Custom TaskPane and Dock Bottom
    'You must Add your Control here
    Private Sub AddTpSqlEdit()
        _tpSqlEdit = New TpSqlEdit()
        TpSqlEditCustomTaskPane = CustomTaskPanes.Add(_tpSqlEdit, "SELECT Elements")
        TpSqlEditCustomTaskPane.DockPosition = Office.MsoCTPDockPosition.msoCTPDockPositionBottom
        'Show TaskPane
        TpSqlEditCustomTaskPane.Visible = True
    End Sub

    Private Sub AddSideTaskPane()
        oUserControl1 = New UserControl1
        oRightTaskPane = CustomTaskPanes.Add(oUserControl1, "FROM Elements")
        oRightTaskPane.DockPosition = Office.MsoCTPDockPosition.msoCTPDockPositionRight
        'Show TaskPane
        oRightTaskPane.Visible = True
    End Sub




End Class
0
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Hi

Thank you for the help on this question
0

Featured Post

New feature and membership benefit!

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

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now