Home > OS >  How to automatically show VSTO Excel Workbook document level Action Pane when opening the Excel Work
How to automatically show VSTO Excel Workbook document level Action Pane when opening the Excel Work

Time:07-26

I created my Document-Level project in Visual Studio by selecting one of my existing excel workbooks in project startup wizard and then I designed my action pane and wrote a code as shown below. My action pane shows automatically when I debug/Start it from Visual Studio but when I try to open that specific document which I created my project on, it won't show.

This is my code in ThisWorkbook.vb so far:

Public Class ThisWorkbook

    Dim apSavingActionPane As New ActionsPaneControl1

    Private Sub ThisWorkbook_Startup() Handles Me.Startup
        Me.ActionsPane.Controls.Add(apSavingActionPane)
        Me.Application.CommandBars("Task Pane").Visible = True
    End Sub

    Private Sub ThisWorkbook_Shutdown() Handles Me.Shutdown

    End Sub

End Class

CodePudding user response:

First of all I should have Publish my project I tried that before but there was an error in publishing process because my solution was on my cloud storage folder on my computer and therefore my project couldn't built because of some creation time difference. I moved my solution on my local disk parts which won't sync after every change and my problem solved.

  • Related