Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. control array for addins

control array for addins

Scheduled Pinned Locked Moved Visual Basic
comdata-structureshelpquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    shinay
    wrote on last edited by
    #1

    I am trying to add dynamic drop down menu in my office com addin toolbar. I use control array for drop down menu, but I can only get the event for the first one instead of each menu item how can I fix this so that events can be generated in each menu item Dim WithEvents cbeButton As Office.CommandBarButton Dim cbcButton() As Office.CommandBarButton private sub CreateMenu() for i = 0 to 3 ReDim Preserve cbcCatalogButton(i) cbcButton(i).caption = i set cbeButton = cbcButton(0) next i end Sub Private Sub cbeCatalogButton_Click(ByVal Ctrl As Office.CommandBarButton, _ CancelDefault As Boolean) msgbox "hello" end Sub

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups