0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Execl2016のVBAのMenuBarの扱い

Posted at

VBA.PNG
Error.png

OSはWindows10 MS-ExeclはExecl2016で質問します。

Option Explicit
Dim myCB As CommandBar, myCBCtrl As CommandBarControl

一部省略

Set myCB = Application.CommandBars.Add(Name:="販売管理", Position:=msoBarTop, MenuBar:=True)

とコマンドバーを定義していた部分がエラーします。

古いExeclのバージョン(Execl2003あたり)では問題なく動いていました。

MSのサイトで調べた感じでは仕様変更がされていない気がします。
https://msdn.microsoft.com/ja-jp/library/office/ff861773.aspx

新しいOffceの新機能?(リボン)との関係で仕様が変えられているのかもしれないです。
もうCommandbars.Addは使えないのでしょうか?
もしくは、どのようにパラメータが変わっているのでしょう。

Commandbars.Addで同様のエラーが出て、対応した方がいればアドバイスをお願いします。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?