VSTO Excel -floating action pane

R

RickH

This code keeps failing with an instance error on the two lines that have
'error at the end.
Can't figure out a way around it. I ant to force a floating action pane of a
specific width.

Imports System.Windows.Forms
Imports Office = Microsoft.Office.Core
Imports Excel = Microsoft.Office.Interop.Excel
Imports System.Text.StringBuilder
Imports System.Object
Imports System.Runtime.InteropServices.Marshal

Public Class ThisWorkbook
Dim myManifestMenu As New ManifestMenu

Private Sub ThisWorkbook_Startup(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Startup

Me.ActionsPane.Controls.Add(myManifestMenu)
Me.CommandBars("Task Pane").Position = _
Microsoft.Office.Core.MsoBarPosition.msoBarFloating 'fails
Me.CommandBars("Task Pane").Width = 200 'fails

End Sub

Private Sub ThisWorkbook_Shutdown(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Shutdown

End Sub

End Class
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top