"User-defined type not defined"

I keep getting the error "User-defined type not defined"
regarding the following Text.

"Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)"

I suspect that there is a conflict with the controls .
If I copy the Backup *.vbp the error disapears for a while ,
Why does this happen and how can i prevent it.

Cheers T
Who is Participating?
caraf_gConnect With a Mentor Commented:
Make sure your project at all times has Microsoft Windows common controls in its components.
What VS service pack have you installed? If you installed VSSP2 or before, you may get the error because the parameter of the method of Toolbar1_ButtonClick
is different in VSSP3.  

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)

is VSSP3 declaration
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.