|
你好,一年前看到你的帖子,不知道现在还能联系到你吗。真的很感谢你。有个问题。
问题见下图:学了好久,为理解代码发愁,想到了你的这个,但是为什么好多都翻译不过来?新增了也不行。
我用的VBA程序解释器_网友wzqoo修改版.rar
以下是测试代码
Option Compare Text
Sub ShowBar()
Dim oCmdBar As CommandBar
Dim oCtrl1, oCtrl2, oCtrl3, oCtrl4 As CommandBarControl
On Error Resume Next
CommandBars("RightButtonBar").Delete
On Error GoTo 0
Set oCmdBar = CommandBars.Add(Name:="RightButtonBar", Position:=msoBarPopup, Temporary:=True)
With oCmdBar
Set oCtrl1 = .Controls.Add(Type:=msoControlButton)
With oCtrl1
.Caption = "复 制 Ctrl+C"
.OnAction = "PutToClipboard"
End With
Set oCtrl2 = .Controls.Add(Type:=msoControlButton)
With oCtrl2
.Caption = "剪 切 Ctrl+X"
.OnAction = "CutToClipboard"
End With
Set oCtrl3 = .Controls.Add(Type:=msoControlButton)
With oCtrl3
.Caption = "粘 贴 Ctrl+V"
.OnAction = "PasteFromClipboard"
End With
Set oCtrl4 = .Controls.Add(Type:=msoControlButton)
With oCtrl4
.Caption = "解释关键字用法"
.OnAction = "ExplainKeyWord"
End With
End With
oCmdBar.ShowPopup
End Sub
|
|