Sub 右键菜单()
With ("Cell")
.Reset
'--------------------------------------------------
With .Controls.Add(Type:=msoControlButton, before:=1)
.Caption = "SoSo工具(&V)"
.FaceId = 266
.OnAction = "显示界面"
End With
'--------------------------------------------------
With .Controls.Add(Type:=msoControlButton, before:=2)
.Caption = "智能加边框(&Z)"
.OnAction = "智能加边框"
.TooltipText = "无需选定单元格即把所用处加上边框"
.FaceId = 800
End With
'--------------------------------------------------
With .Controls.Add(Type:=msoControlButton, before:=3)
.Caption = "自动筛选(&Q)"
.OnAction = "自动筛选"
.TooltipText = "在当前列筛选当前单元格"
.FaceId = 458
End With
'--------------------------------------------------
With .Controls.Add(Type:=msoControlButton, before:=4)
.Caption = "多条件筛选"
.OnAction = "多条件筛选"
.TooltipText = "在当前列筛选当前单元格"
.FaceId = 628
'
.BeginGroup = True
'添加分组线
End With
'--------------------------------------------------
With .Controls.Add(Type:=msoControlButton, before:=5)
.Caption = "多表格计算"
.OnAction = "多表格计算"
.TooltipText = "多个表格的相同单元格进行计算"
.FaceId = 1548
.BeginGroup = True
'添加分组线
End With
'--------------------------------------------------
With .Controls.Add(Type:=msoControlButton)
.Caption = "筛选单元格颜色(ctrl+Q取消筛选)"
.BeginGroup = True
'添加分组线
.OnAction = "筛选单元格颜色"
.TooltipText = "在当前列筛选和当前单元格相同颜色的单元格,再次点击取消筛选"
.FaceId = 3077
End With
'--------------------------------------------------
With .Controls.Add(Type:=msoControlButton)
.Caption = "筛选字体颜色(ctrl+Q取消筛选)"
.OnAction = "筛选字体颜色"
.TooltipText = "在当前列筛选和当前单元格相同字体颜色的单元格,再次点击取消筛选"
.FaceId = 2611
End With
'--------------------------------------------------
With .Controls.Add(Type:=msoControlButton)
.Caption = "按指定内容筛选"
.OnAction = "按指定内容筛选"
.TooltipText = "在当前列筛选和包含指定内容的的单元格。"
.FaceId = 499
End With
'--------------------------------------------------
With .Controls.Add(Type:=msoControlPopup)
.Caption = "选择格式相似的单元格"
.BeginGroup = True
'添加分组线
With .Controls.Add(Type:=msoControlButton)
.Caption = "填充颜色相同"
' .BeginGroup = True
'添加分组线
.OnAction = "选取填充颜色相同"
.FaceId = 3077
End With
'--------------------------------------------------
With .Controls.Add(Type:=msoControlButton)
.Caption = "字体颜色相同"
' .BeginGroup = True
'添加分组线
.OnAction = "选取字体颜色相同"
.FaceId = 2611
End With
'--------------------------------------------------
With .Controls.Add(Type:=msoControlButton)
.Caption = "单元格数字格式相同"
'
.BeginGroup = True
'添加分组线
.OnAction = "选取单元格数字格式相同"
.FaceId = 2773
End With
'--------------------------------------------------
With .Controls.Add(Type:=msoControlButton)
.Caption = "单元格内容相同"
'
.BeginGroup = True
'添加分组线
.OnAction = "选择内容相同的单元格"
.FaceId = 720
End With
'--------------------------------------------------
With .Controls.Add(Type:=msoControlButton)
.Caption = "更多选择..."
.BeginGroup = True
'添加分组线
.OnAction = "按条件选取单元格"
.FaceId = 2761
End With
End With
'--------------------------------------------------
With .Controls.Add(Type:=msoControlPopup)
.Caption = "美化表格(&G)"
' .OnAction = "边框样式"
.BeginGroup = True
'添加分组线
.TooltipText = "当前选区设置一种边框样式"
'--------------------------------------------------
With .Controls.Add(msoControlButton)
.Caption = "美化表格"
.OnAction = "美化表格"
.FaceId = 635
End With
'--------------------------------------------------
With .Controls.Add(msoControlButton)
.Caption = "隔行标色"
.OnAction = "隔行标色"
.FaceId = 692
End With
'--------------------------------------------------
With .Controls.Add(msoControlButton)
.Caption = "单元格3D效果"
.OnAction = "单元格3D效果"
.FaceId = 282
End With
'--------------------------------------------------
With .Controls.Add(msoControlButton)
.Caption = "隐藏网格线"
.OnAction = "隐藏网格线"
.FaceId = 485
End With
'--------------------------------------------------
With .Controls.Add(msoControlButton)
.Caption = "工作表其他设置"
.OnAction = "工作表快捷设置"
.FaceId = 362
End With
'--------------------------------------------------
With .Controls.Add(msoControlButton)
.Caption = "录入当前日期用时间(Ctrl+Shift+Z)"
.OnAction = "录入当前日期用时间"
.BeginGroup = True
'添加分组线
.FaceId = 265
End With
With .Controls.Add(msoControlButton)
.Caption = "时间格式设置"
.OnAction = "时间格式设置"
.FaceId = 209
End With
'--------------------------------------------------
End With
End With
End Sub