Opening credit cards do have an effect on your credit score although negligible. Mine will go down a point or two. Closing them appears to have no effect.
A banker recently told me that closing the credit card has a negative effect due to loss of available credit as the previous poster said. Another banker told me that closing a checking account that hasn't been open for at least a year is also bad. I don't watch my credit score very closely so am not sure.