How to use coreldraw VBA controls

Written by connie whitesell
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to use coreldraw VBA controls
Macros execute multiple commands with a single click.

You can create a custom application shortcut, or macro, that runs a command sequence via a custom button or keyboard shortcut. Macros help you increase the speed and accuracy of your work by automating repetitive tasks. The macros you create in CorelDraw can range from simple recorded macros you make on the fly to complex, hand-coded sequences that extend CorelDraw's functionality. Use the Visual Basic for Applications (VBA) toolbar to create macros.

Skill level:
Easy

Other People Are Reading

Things you need

  • CorelDRAW Graphics Suite X5

Show MoreHide

Instructions

  1. 1

    Right-click the menu bar to display the list of available toolbars.

  2. 2

    Choose "Visual Basic for Applications."

  3. 3

    Point to each button on the VBA toolbar. This activates tool tips that explain each button's use.

  1. 1

    Click the "Record Macro" button on the VBA toolbar to open the "Save Macro" dialogue box.

  2. 2

    Type a name for the macro in the "Macro Name" box. The name must start with a letter and can include letters, numbers and underscore. Don't use spaces or other punctuation marks.

  3. 3

    Describe the macro's purpose in the "Description" box.

  4. 4

    Click the "Store Macro In" button.

  5. 5

    Select a location for storing the macro. Storing the macro in the current document makes it available only when you have the document open. Storing it in a global macro storage (GMS) file makes it available all the time.

  6. 6

    Click "OK." CorelDRAW begins recording your mouse clicks and keystrokes. (See the Tips section for actions you can't record.)

  7. 7

    Perform the actions you want to record.

  8. 8

    Click the "Stop Recording" button.

  1. 1

    Click "Window" on the menu bar.

  2. 2

    Select "Dockers."

  3. 3

    Select "Undo Docker" from the list that appears.

  4. 4

    Perform the actions you want to record. The Undo docker lists each action.

  5. 5

    Click the "Save List to a VBA Macro" button located at the bottom of the Undo docker.

  1. 1

    Click the "Run a VBA Macro" button on the VBA toolbar. This opens a dialogue box listing available macros.

  2. 2

    Select the macro you want to run. If it isn't listed, click the arrow button in the "Macros In" box and select the project or GMS file that contains the macro.

  3. 3

    Click "OK."

  1. 1

    Click "Tools" on the menu bar.

  2. 2

    Select "Customization."

  3. 3

    Select "Commands" from the items listed under "Customization." By default the Commands list shows items from the File menu.

  4. 4

    Click the "Search" button.

  5. 5

    Type "Macros" in the box that opens, and click "Find Next."

  6. 6

    Drag the macro from the list to the toolbar on which you want to display it.

  7. 7

    Type help text in the "Tooltip Help" box. When the mouse pointer hovers over the new macro button, the text you entered appears as a tool tip.

  8. 8

    Click the "Appearance" tab if you want to edit the default button image or import a different icon.

  9. 9

    Click "OK. "

  1. 1

    Click "Tools" on the menu bar.

  2. 2

    Select "Customization."

  3. 3

    Select "Commands" from the items listed under "Customization." By default the Commands list shows items from the File menu.

  4. 4

    Click the "Search" button.

  5. 5

    Type "Macros" in the box that opens, and click "Find Next."

  6. 6

    Select the macro you want to edit from the list that appears.

  7. 7

    Click the "Shortcut Keys" tab.

  8. 8

    Press the computer keys you want to assign as a keyboard shortcut. If the keystrokes you enter apply to a different command, you can either override the current assignment or try another key combination.

  9. 9

    Click "OK."

  1. 1

    Click the "Run a VBA Macro" button on the VBA toolbar. This opens the Visual Basic for Applications dialogue box.

  2. 2

    Select the macro you want to check from the list that appears. If it isn't listed, click the arrow button in the "Macros In" box, and select the location of the project or GMS file that stores the macro.

  3. 3

    Click "Edit." This opens the selected macro in the code window of the Microsoft VBA Editor.

  4. 4

    Use the editor to make the necessary changes.

  1. 1

    Click the "VBA Editor" button on the VBA toolbar.

  2. 2

    Click the "Help" toolbar button to open the help feature for working with the Microsoft Visual Basic Program Environment.

  3. 3

    Press the computer's "F2" key to open the Object Browser.

  4. 4

    Click the "All Libraries" text box.

  5. 5

    Select "CorelDRAW."

  6. 6

    Press the computer's "F1" button to open "Getting Started with VBA" in CorelDRAW VBA Help.

Tips and warnings

  • Pointing to a button on the VBA toolbar displays a tool tip that identifies its use.
  • The Tools menu also displays the tools on the VBA toolbar.
  • You cannot record all actions. Actions that you can't record, according to "CorelDRAW 12: The Official Guide," include editing text or adding line segments with the freehand tool. You can code these actions manually.
  • If you want to exclude actions from the recording, click the "Pause" button on the VBA toolbar, perform the extraneous actions, then click the "Record" button to restart recording.

Don't Miss

Filter:
  • All types
  • Articles
  • Slideshows
  • Videos
Sort:
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the eHow.co.uk site, you consent to the use of cookies. For more information, please see our Cookie policy.