VB activating Task pane

Add-in Express™ Support Service
That's what is more important than anything else

VB activating Task pane
 
Sandra Toolan




Posts: 2
Joined: 2008-02-18
Hi

Sorry for the arb question but...

using a command bar button I want to enable and show a/the task pane. App is Excel 2003, but I'm writing with excel 2007 (if its relevant).

The task Pane part works fine, and I've run command bar button code comfortably so its just the missing bit.

I saw some code in the forum but it was VCL.

Oh BTW I love this stuff!! :D
Posted 18 Feb, 2008 12:43:04 Top
Fedor Shihantsov


Guest


Hello Sandra,

The code below:

Private Sub cmbbHide_Click(ByVal sender As Object) 
    If adxExcelTaskPanesCollectionItem1.TaskPaneInstance IsNot Nothing Then 
        adxExcelTaskPanesCollectionItem1.TaskPaneInstance.Hide() 
    End If 
End Sub 

Private Sub cmbbShow_Click(ByVal sender As Object) 
    Dim taskPane As AddinExpress.XL.ADXExcelTaskPane = adxExcelTaskPanesCollectionItem1.TaskPaneInstance 
    If adxExcelTaskPanesCollectionItem1.TaskPaneInstance Is Nothing Then 
        taskPane = adxExcelTaskPanesCollectionItem1.CreateTaskPaneInstance() 
    End If 
    
    If Not taskPane.Visible Then 
        taskPane.Show() 
    End If 
    
    Dim tackPaneCollapsed As Boolean = taskPane.Visible AndAlso Not taskPane.Active 
    If tackPaneCollapsed Then 
        taskPane.Activate() 
    End If 
End Sub 
Posted 19 Feb, 2008 03:56:15 Top
Sandra Toolan




Posts: 2
Joined: 2008-02-18
You are such a Hero - Thanks :D

BTW did I mention that I absolutely love this stuff!!

Saw the site a while back, came back every so often, didn't really have the need - didn't think I could justify spending the money - was a toy I wanted ... but did I need it.

Somehow forgot, the need arose and so did VSTO...

Anyway, saw the light, spent the money :) and it really has to be the single best tool I have purchased ... well, probably since datawidgets in VB3 ;).

Its really nice to find GOOD code.

Anyway, enough ego stroking ;) - thanks for the speedy answer, worked perfectly.
Posted 19 Feb, 2008 20:02:50 Top