AFAIR, I implemented it such that member and variable annotations attach to the next member or variable.
And module annotations can be anywhere above the first member.
The one remaining point that is confusing for a lot of people is that attaching annotations, especially @Ignore, is based on the physical line and not the logical line.
@IvenBach What the VBE thinks is the declaration section is entirely irrelevant to the annotations.
@MathieuGuindon Nah, it hasn't been there for that long. I deactivated it at some point, and then I activated it again, and then I switched the room for it to her debug room as I was sick of seeing how far ahead you were
@BloggingDuck '... Code Explorer will display these modules with a dedicated “interface” icon. ' Do we want to include that icon in the post or forgo it in case the icons later change?
Giving it more thought not including the icon makes more sense for that very reason of changing icons.
TYVM for taking the time to write the annotations post. Very helpful knowing more of the inner workings and how to properly use them.
I'd make the change suggesting that all ExcelHotkeys include the Shift modifier key. This is because every key Ctrl+FooKey is used for a default excel hotkey.
@M.Doerner not as confusing as @Ignore only skipping code inspections and not allowing you to exclude a module from parsing/resolving when it is throwing a bunch of errors you don't want to worry about fixing immediately
@MathieuGuindon on that note I have a question - how do hotkeys work in a userform with controls that capture events? for example if you have a textbox and the user hits tab or alt, do you have a chance to intercept that or is it overridden by the host userform?
@IvenBach yeah even though I basically said it yesterday I'd like to second this
yeah I have KeyDown (and KeyUp) handled but I wasn't tracking what it was doing. like I saw KeyDown fire in textbox1 and then KeyUp in textbox2 so it seemed like textbox1 was reporting the tab to the userform itself.
but I didn't see how I could actually stop or do anything with it in the KeyDown.
with that said that is a good point, there really isn't any reason to intercept a tab. it was more enter than anything since the behavior is not consistent with other windows forms.
I want it to send the click to whichever command button is focused, not tab as it appears to normally.
Or am I misunderstanding the default enter key behavior?
@IvenBach i don't want to circumvent the default tab behavior
i just want the enter key to click whichever command button has focus as it does in a normal windows form instead of seemingly do the exact same thing as tab
i guess focus is actually the wrong word specifically but i dont know what else to call it. its the command button that has the double thickness blue highlighting when it is not being directly interacted with.
i called it focus because it is possible for a button to have that while it is the actual focused control if the user is not mousing over it.