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
'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