We have been shortlisted! We are delighted to be nominated for 5 Tech for Good awards for our work with South African charity Shout It Now. Read more here.
Visual Logic Editing
Visual Logic: Editing
Visual Logic code can be edited in similar ways to editing text by using a combination of keyboard commands and mouse controls.
There are 6 main keyboard commands:
- Copy whole line: hold down ALT and press C
- Cut whole line: hold down ALT and press X
- Paste whole line: hold down ALT and press V
- Copy selected text: highlight text, hold down CTRL and press C
- Cut selected text: highlight text, hold down CTRL and press X
- Paste selected text: highlight text, hold down CTRL and press V
- If no text is selected these will perform the same function as ALT i.e. copy, cut and paste the entire line.
To Copy a line of Visual Logic select it and press the CTRL+C keys. This copies the line to the clipboard.
To Paste the line of code select the line immediately above the paste location and press CTRL+V. This pastes the line from the clipboard.
CTRL+C copies a parent line and any child lines. This means that when an If… statement is copied the lines of VL nested underneath are copied too.
To copy multiple lines of code that are not nested select the first line of code then press shift and click on the bottom line of the block and this will highlight all line in between. From here use CTRL+X or CTRL+C to cut or copy and CTRL+V to paste where the block should be positioned.
To move a line of Visual Logic to a new location, simply click the line to be moved with the left mouse button, drag and release the mouse button when the white rectangle is over the line the moved line is to be positioned under. When a line is moved it will move any child lines along with it so selecting an IF statement will move all nested lines along with it.
Alternatively, there is an option allowing more protection than a simple click and drag that requires the ALT key to be pressed before clicking and dragging the line of code to move. This is switched off by default but can be switched on by right-clicking in a yellow VL section window then selecting Edit Options > Allow line move dragging without ALT. This should remove the tick next to this statement, indicating it is switched off.
Other commands useful for navigation are CTRL+HOME to go to the top line in a section of Visual Logic and CTRL+END to go to the bottom line.