Hi. My name is***** a camera repair technician with over 20 years in the business and I'll be glad to help you with your question today.
What you are experiencing is usually caused by a failure in the elecreonic diaphram mechanism within the lens. The way to tell for sure is to try the lens on another body or try a known good lens on the 40D.
Damaged power diadhram units are the #1 cause for the malfunction you are describing.
This really isn’t a user serviceable problem and should be repaired by a qualified technician. Your best bet would be to check locally for a camera repair shop in your area. If you need assistance locating a shop near you, please let me know and I'll locate one for you.
Thanks for your answer.
I will take your advice but do not know of any such repair service locally. I live on the Welsh/Shropshire borders and would welcome any suggestions.
Happy to leave you a positive response.