EXCEL VBA创建菜单的代码 Sub Creatxlsht() On Error Resume Next Application.CommandBars("xlsht").Delete Dim cbrCmdBar As CommandBar Dim strCBarName As String strCBarName = "xlsht" Set cbrCmdBar = Application.CommandBars.Add(Name:=strCBarName, Position:=msoBarPopup) Set