Hello everybody!
Is it possible to assign F5 to "Format / Size to fit" menu in VBE?Greetings!
I don't believe the VBA Editor lets you add/change shortcut keys. If someone knows differently I would love to hear it.
Happy coding,
-Shelby
Hello, everybody!
Since this issue is important to me, I made an effort to come up with something. I offer you my solution. Surely there can be better ones.
Here's how we're going to make Alt-B perform the "Size to fit" operation in VBEditor
1. We create our own "Size to fit" button in a new or existing button bar.2. Change button name to Size to fit &B or Any Name &B3. Style of button must be Text only (always) or Image and text. If no text on Button caption hot key Alt-B don't work, because &B not exist in caption.Ready!
Important!VBE Root menu - File Edit View etc. have hot keys Alt-F Alt-E Alt-V respectivelyNo two menus should have the same hotkeys. If there are, then for both the hotkey will not work.For this reason I have chosen the Alt-B hotkey to run Size to fit command
Two problems remain to be solved:
1. How do I get F5 to do Size to fit, but as long as Alt-B does it's not a big problem. 2. How do I make pressing a function key or key combination in VBE run a macro. Any idea in this direction will be gratefully received.Greetings!