Hi All,
I'm new to the forum. My first thread concerns usage of custom controls added to VBE
Problem: to add functionality, which will allow vba programmer to insert tags (as commented statements) during design time via custom controls.
For example, I want to add the following tag:
in the code module; tag should start at the current cursor position. This should be an analog to built-in functionality of commenting text via 'comment block' control
Solution to the problem
I'm adding control (CommandBarButton) to the CommandBar and "linking" it to the class, which is wrapping control click event
Code executed in "auto-open" formula to rebuild customized commandbar
Class module code to wrap user click action
(Class module name = "CVBECommandHandler")
Now, the problem is, that it is placing tag in the active code pane as it was expected to do, but only for the first time it is used. A have to run AddNewVBEControls method to have this working again, but still it will place the tag only at first click. After this first use there is no respond to this action, when I trying to place next tags.
Please kindly help me to resolve this problem. Thanks
Regards,
Kamil Z. (Poland)
---------- Post added at 04:01 PM ---------- Previous post was at 03:59 PM ----------
I've forgot about private properties in the codu module, which add custom commandbarbutton control:
Bookmarks