Paul, I have done this in my house. I learned that there needs to be three wires going from the wall switch to the fan in order to have a dimmer. I tried adding a dimmer to another fan in my house that only had two wires going from the switch to the fan and as the light dimmed, so did the fan speed. I consulted with a family member that is an electrician and he told me that I could not put a dimmer on a fan that only has two wires in the wall. The third wire, the red, is the constant power supply. If I continued to use the dimmer on the one not suitable for a dimmer, the fan motor would eventually burn out.
Hope I didn't confuse the issue, hope it helped. -Steve