Manipulate CorelDraw layers


Corel VBA provides a function for adding layers, but that one reports an error when the layer already exists and stops the code.

ATTENTION: Requires LayerExists Function (Page 2)

'Create a new layer
Public Sub LayerCreate(varLayerName As String)

Set myDoc = Application.ActiveDocument
If Not LayerExists(varLayerName) Then myDoc.ActivePage.CreateLayer (varLayerName)

End Sub

You might also like...


About the author


Thamar Poland

I was born in a small town in Holland, and currently live in Poland. I'm fluent in English, German, Polish and Dutch, speak a bit of French and Russian. After finishing Information Technologies ...

Interested in writing for us? Find out more.


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“My definition of an expert in any field is a person who knows enough about what's really going on to be scared.” - P. J. Plauger