![]() |
|
#1
|
|||
|
|||
|
Hi,
Here's a simple piece of code: Code:
With CorelDRAW.ActiveDocument.ActivePage
For I = 1 To .Layers.count
MsgBox .Layers.Item(I).Name
Next I
End With
Code:
Const I as Byte = 1 (I encounter the same problem when looping through any type of object.) *Let's say we set I=-1, we would get the same msg. Thanks Andy |
|
#2
|
||||
|
||||
|
Quote:
Dim i As Long i=2 ...Layers(i)... This will work. Or better yet, use VBA's For Each statement: Code:
Dim lr as Layer
For Each lr in ActivePage.Layers
MsgBox lr.Name
Next lr
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Send to layers | click101 | CorelDRAW/Corel DESIGNER VBA | 4 | 14-09-2004 02:46 |
| File Converter - turning off layers | venturian | CorelDRAW/Corel DESIGNER VBA | 6 | 27-01-2004 08:08 |
| Whether the VBA can work with Unicode . | Dino | CorelDRAW/Corel DESIGNER VBA | 5 | 27-08-2003 16:13 |
| opendocument doesn't work in a VB project | s_federici | CorelDRAW/Corel DESIGNER VBA | 7 | 17-06-2003 09:43 |
| looping until documents.count = 0 | bbolte | CorelDRAW/Corel DESIGNER VBA | 18 | 18-02-2003 15:03 |