RonMcK3
09-11-2007, 08:48 PM
Hi, All !
In Import notepad and wordpad text files, Johnske uses the following code in the ThisWorkbook module to add a program and its caption to the Right Click menu.
My question: Is it at all practicable to assign an Accelerator for this menu caption, like those on the other menu options? (Assuming of course that I find a letter not already in use on the rt-clk menu.) : pray2::help:dunno
Private Sub Workbook_Open()
'//remove any previous right-click controls
Run "RemoveFromMenu"
'//now add new right-click controls
With Application.CommandBars("Cell")
.Controls.Add(Type:=msoControlButton). _
Caption = "My Caption Goes Here"
'//assign procedures to these controls
.Controls("Import Account Data"). _
OnAction = "MyProgramNameGoesHere"
End With
End Sub
Thanks in advance!
In Import notepad and wordpad text files, Johnske uses the following code in the ThisWorkbook module to add a program and its caption to the Right Click menu.
My question: Is it at all practicable to assign an Accelerator for this menu caption, like those on the other menu options? (Assuming of course that I find a letter not already in use on the rt-clk menu.) : pray2::help:dunno
Private Sub Workbook_Open()
'//remove any previous right-click controls
Run "RemoveFromMenu"
'//now add new right-click controls
With Application.CommandBars("Cell")
.Controls.Add(Type:=msoControlButton). _
Caption = "My Caption Goes Here"
'//assign procedures to these controls
.Controls("Import Account Data"). _
OnAction = "MyProgramNameGoesHere"
End With
End Sub
Thanks in advance!