/Home /Archive /Syndicate /Blog /Support /About /Contact  
All Visual Basic Feeds in one place!





If you are using Actions Panes in a VSTO Excel add-in you might have seen the following behavior. You create an new ActionPane, derived from UserControl, and add it to the Workbook ActionsPane.Controls collection. It shows up nicely so you think you are done.
 
Now the user creates a new Spreadsheet using File/New. Note that the ActionsPane disappears and remains hidden until the user reactivates it using View/Task Pane or Ctrl+F1.
 
So how do you automatically display the TaskPane when the user switched back to the original document? You need to add the following code to the ThisWorkbook type:
 
PrivateSub ThisWorkbook_WindowActivate(ByVal Wn As Window) HandlesMe.WindowActivate
    Application.DisplayDocumentActionTaskPane = True
EndSub
 
Enjoy!
 
Share this post: email it! | bookmark it! | digg it! | live it!
© 2005 Serge Baranovsky. All rights reserved.
All feed content is property of original publisher. Designated trademarks and brands are the property of their respective owners.

This site is maintained by SubMain(), a division of vbCity.com, LLC