Code VBA v9.0 - knowledge and productivity add-ins
Code VBA v9.0 - knowledge and productivity add-ins
Code VBA is an add-in for both professional software developers and MS Office users of Visual Basic for Applications. Using Code VBA you will write VBA code faster and spend less time looking for solutions on-line:
Insert lines or complete blocks of code: declarations, program structures (If, Select, loops), standard user interactions such as msgbox and file selection, but also new ones e,g. the SelectionBox and so on.
Declaring variables with just a few keystrokes is a real time saver.
Find and insert VBA, Access VBA / ADO / DAO and Excel VBA source code from the logically organized menu.
The inserted code automatically hooks up with the already available code by matching procedure arguments with available variables.
Extend the Code VBA library with your own code fragments.
Tooltips show what classes and procedures do and give direct access (F1) to the relevant documentation and tutorials on Office MSDN online.
The Code Explorer lets you move to the relevant procedures easily and adds many new features such as insert procedure call with arguments, test procedure from immediate window, comment code and tidy the code indentation.
The Class Builder and UserForm builder help you create custom classes and userforms custom dialogs with validation fast and easy.
Code VBA works with Works with MS Access, Excel, Word, Outlook, PowerPoint, Publisher, MS Project, SharePointDesigner, Visio and AutoCad. Office 2000 - 2019, both 32 and 64 bit versions; Windows XP (SP3), VISTA, Windows 7, Windows 8 and Windows 10.
Creating a userform
Userforms are custom dialogs used to collect input data from the user at the start of a macro. The UserForm Builder included in Code VBA automatically makes UserForms. The generated user forms have with input validation code added to ensure the all required input is of the correct type. This will make the macro more reliable. Having the controls and validation code generated saves a lot of time you would have to spend to create the userform manually. The UserForm can be changed both to make the design visually more attractive by moving and resizing the controls. In addition you can extend the userform vba code to fulfill extra requirements.
In the UserForm Builder you will specify
UserForm Name: give a name to the form which is short for the data that will be entered. In the example the name was 'Order'
The Controls grid is the area in which you specify which controls you want to have included in the UserForm you are currently creating. Each control is specified in a seperate line with properties:
Name: will be used as the label for the input control.
Data Type: if the user enters a value of the wrong type in the control, pressing the OK button results in a message to the user that a value for that field is incorrect and sets the cursor back to that field for the user to correct it.
Control Type: lets you specify what control type is preferred. A boolean (yes/no) can be represented in a user friendly way using a check
Required: if the user does not enter a value in the control, pressing the OK button results in a message to the user that a value is missing for that field and sets the cursor in that field.
Select Names...: opens a range selection inputbox to enable you to select one or more names from your Excel sheet. This is useful if your dialog is created to fill an existing Excel form or table.
Create: creates the UserForm - image below - and inserts the code to start the userform.
29jul21 v9.0.38-39
Under menu 'Objects' now names that are recognized by VBA such as Me and Sheet1 are recognized allowing you to directly use them without first having to declare variables. Note: the objects in MS Access still need to adjusted.
The additional 'Objects' also are available in the Procedure Builder Class variable selection box
Extended the fragments syntax so that the Fragment Inserter now can let you select appropriate method, e.g. MailItem .Draft or .Send
Under menu 'Objects' now names that are recognized by VBA such as Me and Sheet1 are recognized allowing you to directly use them without first having to declare variables. Note: the objects in MS Access still need to adjusted.
The additional 'Objects' also are available in the Procedure Builder Class variable selection box
Extended the fragments syntax so that the Fragment Inserter now can let you select appropriate method, e.g. MailItem .Draft or .Send
Only for V.I.P
Warning! You are not allowed to view this text.