Murray Brown
asked on
VB.net Can't use a variable anywhere else in the project
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.Cus tomTaskPan e
Private oUserControl1 As UserControl1
Public oRightTaskPane As Microsoft.Office.Tools.Cus tomTaskPan e
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(_tpSql Edit, "SELECT Elements")
TpSqlEditCustomTaskPane.Do ckPosition = Office.MsoCTPDockPosition. msoCTPDock PositionBo ttom
'Show TaskPane
TpSqlEditCustomTaskPane.Vi sible = True
End Sub
Private Sub AddSideTaskPane()
oUserControl1 = New UserControl1
oRightTaskPane = CustomTaskPanes.Add(oUserC ontrol1, "FROM Elements")
oRightTaskPane.DockPositio n = Office.MsoCTPDockPosition. msoCTPDock PositionRi ght
'Show TaskPane
oRightTaskPane.Visible = True
End Sub
End Class
Thanks
Public Class ThisAddIn
Private _tpSqlEdit As TpSQLEdit
Public TpSqlEditCustomTaskPane As Microsoft.Office.Tools.Cus
Private oUserControl1 As UserControl1
Public oRightTaskPane As Microsoft.Office.Tools.Cus
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(_tpSql
TpSqlEditCustomTaskPane.Do
'Show TaskPane
TpSqlEditCustomTaskPane.Vi
End Sub
Private Sub AddSideTaskPane()
oUserControl1 = New UserControl1
oRightTaskPane = CustomTaskPanes.Add(oUserC
oRightTaskPane.DockPositio
'Show TaskPane
oRightTaskPane.Visible = True
End Sub
End Class
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER