Software Developer's Kit - ChemDraw

Send comments on this topic
Count Property
See Also 


Member of ChemDraw Control.MenuBars.

Returns the number of menu bars in the collection.

Property type

Read-only property


Visual Basic
Public Property Count() As Integer

Return Type



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