Switch Assignment |
Top Previous Next |
VS VB6 VBA The Switch Assignment feature allows you to swap the left and right sides of an assignment statement of one or more selected lines in a source code file. This is useful, for example, when you have to assign the values to a set of controls: TextBoxFirstName.Text = firstName TextBoxLastName.Text = lastName TextBoxEMail.Text = eMail and in another part of your code you have to do the opposite assignment: firstName = TextBoxFirstName.Text lastName = TextBoxLastName.Text eMail = TextBoxEMail.Text In this case the second block of code could be generated copying and pasting the first block, selecting the pasted block and applying this feature. MZ-Tools offers the following ways to switch the sides of an assignment:
See Also: |