值不在预期的范围内
oCommandBar = myExcel_No08.CommandBars .Add ("QRCodeCommandBar", Microsoft.Office.Core.MsoBarPosition.msoBarTop,Microsoft .Office .Core .MsoBarType.msoBarTypeMenuBar, true);
oCommandBar.Visible = true;
oCommandBarButton = (Office.CommandBarButton)oCommandBar.Controls.Add(Office.MsoControlType.msoControlButton,
oMissing, oMissing, oMissing, oMissing);
oCommandBarButton.OnAction = "MiBarCall";
oCommandBarButton.Caption = "Call MiBarCall()";
oCommandBarButton.FaceId = 2151;
第一行就有异常。
提示:
System.ArgumentException: 值不在预期的范围内。
在 Microsoft.Office.Core.CommandBarsClass.Add(Object Name, Object Position, Object MenuBar, Object Temporary)
......