View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
RickH RickH is offline
external usenet poster
 
Posts: 3
Default VSTO Excel -floating action pane

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.msoBarFloatin g '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