Turn off the power to the ceiling fan by turning off the circuit breaker or removing the fuse that controls the power to the room with the ceiling fan in it.
Mark the pull chain on the broken ceiling fan light switch by tying a string around it or placing a piece of tape on it. This way you won't confuse it with the ceiling fan control switch after the ceiling fan light fixture is removed from the fan unit.
Remove the light bulbs and the glass covers that cover the light bulbs on your ceiling fan by loosening the screws at the base of each glass cover. These screws are made to be turned by hand.
Remove the ballast cover by removing the three or four screws that hold it in place. The ballast cover is the lower portion of the ceiling fan light fixture that has the light bulb fixtures attached to it.
Slowly lower the ballast cover and light bulb portion of the ceiling fan light fixture. The ballast cover will still be attached to the ceiling fan by wires, so be careful not to pull the ballast cover off with too much force.
Disconnect the ceiling fan light fixture from the actual fan. In newer fans, there should be a wire harness that is easy to disconnect. The wire harness is the small white plastic part that connects all the wires from the ceiling fan light fixture to all of the wires in the ceiling fan itself. This wire harness comes apart by pressing down on the release lever and pulling the male and female ends apart. In older model fans, you may need to unscrew the wire nuts connecting the wires from the light fixture to the ceiling fan. The colors of the two wires going into each wire nut will match, so there should be no problem reconnecting the wires.
Place the ceiling fan light fixture on a table or other stable work surface.
Locate the internal light switch inside the ceiling fan light fixture. Make sure you don't confuse the light switch with the fan switch. You should have marked it in step 2.
Remove the broken ceiling fan light switch by unscrewing the cap that is on the outside of the ballast cover. You can unscrew this cap by hand and it will normally be silver or brass in color. It will be located where the pull chain meets the ballast cover.
Note the number and colors of the wires going to the ceiling fan light switch, and make sure they match the colors of the wires coming out of your new ceiling fan light switch. If they don't, you may have the wrong type of switch. If this is the case, you may need to remove your old ceiling fan light switch and take it to your local hardware store and get help finding the right switch.
Disconnect the wires from the old ceiling fan light switch by unscrewing the "wire nuts" that connect each pair of wires.
Connect the wires from your ceiling fan light fixture to your new ceiling fan light switch one matching pair at a time. Connect the wires by twisting the exposed ends together in a clockwise direction, placing the wire nut on the end of the two twisted wires, and turning it clockwise to tighten it.
Repeat step 12 for each matching pair of colored wires going to your ceiling fan light switch.
Mount the new ceiling fan light switch to the ceiling fan light fixture by placing the switch inside the ballast cover and inserting the threaded end of the ceiling fan light switch through the hole in the ballast cover. This will be the same hole that the old switch came out of.
Thread the pull chain through the end cap used to hold the ceiling fan light switch in place. Next, screw the end cap onto the threaded portion of the ceiling fan light switch.
Reconnect the wires from the ceiling fan light fixture to the ceiling fan itself using the wire harness in the same manner that you disconnected it in step 6.
Replace the ballast cover and the ceiling fan light fixture using the screws that you removed in step 4.
Replace the glass light bulb covers.
Turn on the power from the circuit breaker or fuse box.
Test your new ceiling fan light switch.