Software Developer's Kit - ChemDraw

Send comments on this topic
Item Method
See Also 
index

The location of an object in a collection, counted from the top, starting with 1.

Description

Member of ChemDraw Control.MenuBars.

Given an index, returns a MenuBar from the MenuBars collection.

Syntax

Visual Basic
Public Function Item( _
   ByVal index As Integer _
) As Object

Parameters

index

The location of an object in a collection, counted from the top, starting with 1.

Return Type

Example

Private Sub cmdApplication_click()
   'Declares variables 
    Dim myMenu As ChemDrawControl11Ctl.Menu
    Dim myMenus As ChemDrawControl11Ctl.Menus
    Dim myMenuBar As ChemDrawControl11Ctl.MenuBar
    Dim myMenuBars As ChemDrawControl11Ctl.MenuBars
    Dim myMenuItem As ChemDrawControl11Ctl.MenuItem
    Dim myMenuItems As ChemDrawControl11Ctl.MenuItems   
   'Sets menu bars  
    Set myMenuBars  = ctlChemDraw.Application.MenuBars
   'MENU BARS properties
    Set myMenuBar = ctlChemDraw.Application.MenuBars.Item(1)   
    Text1.Text = myMenuBars.Application
    Text2.Text = "Menu Bars: " & myMenuBars.Count
End Sub

See Also