Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


"User-defined type not defined"

Posted on 1999-07-22
Medium Priority
Last Modified: 2012-08-13
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
Question by:visualbasic
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 10

Accepted Solution

caraf_g earned 200 total points
ID: 1526600
Make sure your project at all times has Microsoft Windows common controls in its components.

Expert Comment

ID: 1526601
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

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question ( in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

661 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question