ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VSTO Excel -floating action pane (https://www.excelbanter.com/excel-programming/369502-vsto-excel-floating-action-pane.html)

RickH

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


All times are GMT +1. The time now is 03:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com