| 
    
     |  | 現在のコマンドバー情報を取得し、ファイルクローズと同時に元に戻したい。 アクティブになっているコマンドバー情報の取得の方法はわかりました。
 ・auto_open()とauto_close()は標準モジュールに記述している
 ・開いたときは初期状態を保有しつつ、自作の「toolbar」をこのシートだけで使用したい。
 ・初期状態はどこかにBuffを用意し、クローズ後に呼び出すしかないでしょうか?
 何か他に良い方法がございましたら教えてください。
 
 Sub auto_open()
 
 Dim cb As CommandBar
 
 For Each cb In CommandBars
 If cb.Visible = True Then
 MsgBox cb.Name
 
 End If
 
 Next cb
 
 Application.CommandBars("toolbar").Visible = True
 End Sub
 
 Sub auto_close()
 
 Dim cb As CommandBar
 
 For Each cb In CommandBars
 If cb.Visible = True Then
 MsgBox cb.Name
 
 End If
 
 Next cb
 
 Application.CommandBars("toolbar").Visible = False
 End Sub
 
 
 |  |