ToolBar ButtonMenu click problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vagaisuresh
    New Member
    • Jun 2007
    • 17

    #1

    ToolBar ButtonMenu click problem

    Hai Friends,


    I am using a ToolBar in my project. When I click the financial year in dropdown (toolbar), I want to disable the (clicked) financial year and already disabled financial year will be getting enabled.

    Anybody help me!

    Suresh
  • SkinHead
    New Member
    • Jun 2007
    • 39

    #2
    What version of VB are you using ?

    VB6, VB.NET, VBA ?

    What code have you got so far ?

    Comment

    • vagaisuresh
      New Member
      • Jun 2007
      • 17

      #3
      Originally posted by SkinHead
      What version of VB are you using ?

      VB6, VB.NET, VBA ?

      What code have you got so far ?

      Hai...

      Using VB6.0

      Suresh

      Comment

      • vagaisuresh
        New Member
        • Jun 2007
        • 17

        #4
        Friend,

        I am just add the ButtonMenus in load event.

        [HTML]
        Private Sub MDIForm_Load()
        Toolbar1.Button s(9).ButtonMenu s.Add = "2004 - 2005"
        Toolbar1.Button s(9).ButtonMenu s.Add = "2005 - 2006"
        Toolbar1.Button s(9).ButtonMenu s.Add = "2006 - 2007"
        Toolbar1.Button s(9).ButtonMenu s.Add = "2007 - 2008"
        Toolbar1.Button s(9).ButtonMenu s.Add = "2008 - 2009"
        End Sub
        [/HTML]

        Comment

        • hariharanmca
          Top Contributor
          • Dec 2006
          • 1977

          #5
          Originally posted by vagaisuresh
          Friend,

          I am just add the ButtonMenus in load event.

          [HTML]
          Private Sub MDIForm_Load()
          Toolbar1.Button s(9).ButtonMenu s.Add = "2004 - 2005"
          Toolbar1.Button s(9).ButtonMenu s.Add = "2005 - 2006"
          Toolbar1.Button s(9).ButtonMenu s.Add = "2006 - 2007"
          Toolbar1.Button s(9).ButtonMenu s.Add = "2007 - 2008"
          Toolbar1.Button s(9).ButtonMenu s.Add = "2008 - 2009"
          End Sub
          [/HTML]
          can you explain why you are going to do this?

          if you explain your Requirement we will give better solution (you are hard coding the process).

          Comment

          • vagaisuresh
            New Member
            • Jun 2007
            • 17

            #6
            Originally posted by hariharanmca
            can you explain why you are going to do this?

            if you explain your Requirement we will give better solution (you are hard coding the process).
            Thanks for all!

            I got the result.

            [HTML]
            Private Sub Toolbar1_Button MenuClick(ByVal ButtonMenu As MSComctlLib.But tonMenu)
            Dim cIndex As Integer
            If ButtonMenu.Inde x > 0 Then
            cIndex = ButtonMenu.Inde x
            End If
            MsgBox "" & cIndex
            End Sub[/HTML]

            Suresh

            Comment

            Working...