Misc VBA Utilities
AutoVBA has several other tools that don't fit neatly into the previous categories:
- Display Line Numbers
- Sort code
- Mass Import / Export Code Modules
- Copy and Paste Userform Controls and Their Code
Display Line Numbers
What does it do?
Toggle displaying line numbers in the active module; useful when reviewing code.
How to access it?
Via the button on the Code Tools toolbar:
Sort Code
What does it do?
Allows you to quickly rearrange your code module without copying / pasting.
Simply open the Sort Code Menu, select code elements, and press the up/down arrow to move them.
How to access it?
Via the button on the Code Tools toolbar:
Mass Import / Export Modules
The Visual Basic Editor allows you to import or export modules and UserForms. Unfortunately, it only allows you to import or export one module at a time.
AutoVBA adds in the ability to mass import or export modules and UserForms. To access the features, right-click in the VBAProject window.
Copy UserForm Controls and Code
The Visual Basic Editor allows you to copy / paste controls from one UserForm to another. Unfortunately, when you do this the associated control code isn't copy / pasted along with the control.
AutoVBA adds the ability to copy and paste the code along with the control. To access this feature, select your desired control(s) and select "Paste Special". Then go to the destination UserForm and choose Paste Special to paste the control(s) and the associated code.