Hi,
I need some help regarding how to run registered commands from contextmenu. I've successfully created the contextmenu and I am calling directly the subroutines, but what will be the best approach, using sendstringtoexecute? After all I've read, sendstringtoexecute is not recommended all the time. The reason why I want this is to simplify rerunning a command through right-click menu.
Thank you,
George
The context menu click handler should be a separate sub that uses SendStringToExecute to call your command method.
I don't remember what error I got, but when I tried to make the handler call the Sub directly, it gave me a runtime error.
Right now I have the code directly in the handler and it is working ok, but to repeat the command I have to right-click again and choose the command (actually from the submenu). I f I separate the code into a different sub and use SendStringToExecute, the code won't work first time because it is asynchronous (I think), though I will get the command in "Repeat Command" and "Recent Command" and this is what I want too, but I feel that I am missing something and I don't know what.
Thanks,
George
Can't find what you're looking for? Ask the community or share your knowledge.