API Documentation > CorelDRAW > 2025-v26 > Page > IVGPage
Page.ActiveLayer property
Gets the active layer on the page object
Syntax:
Property Get ActiveLayer() As Layer
Remarks:
The ActiveLayer property returns the active layer of a specified page.
Examples:
The following VBA example places page numbers on each page of the document.
Sub Test()
Dim p As Page
For Each p In ActiveDocument.Pages
  p.ActiveLayer.CreateArtisticText 0, 0, "Page " & p.Index
Next p 
End Sub