There are a great many errors that we can run into when programming, and just on of those is a Compile Error, specifically "User-Defined Type Not Defined".

This error could mean one of a few different things, which may not all be listed here. Two of the most common, however, are:
1. You are trying to create your own Constants and did not declare the Enum.
For an example of this, see my article on Creating Your Own Constants For Functions [1]
2. You are automating an external program, (using Early Binding [2],) and forgot to set a reference to the required library.
The steps that are listed below are assuming that you need to set a reference to PDFCreator in order to use some one of the PDFCreator examples [3] on this site. Be aware that this could just as easily be applied to setting a reference to Word, Access or any application that you are attempting to set an Early bind to.
To set a reference:
- Enter the Visual Basic Editor (VBE)
- Go to Tools|References
- Scroll down the list until you find the library that you need and check the box:

- Click OK, and your reference is set
Hints: