The problem is here:
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Well, since you are coding in VB6, you will learn some of the tricks in the VB6 playbook. Rename the method temporarily to something else, for example qqToolbar_ButtonClick, then go to the designer and click the button on the toolbar to restore the event in the code.
If the signature was erroneous, it will be correctly restored from the constructor, and you can see this problem.
Another test is to see if ToolBar1 is added to the control array? In this case, the method signature should look like this:
Private Sub Toolbar1_ButtonClick(ByVal Index as Integer, ByVal Button As MSComctlLib.Button)
I hope one of them helps solve the problem for you.
Jason herrmann
source share