Visitors to family and friends on wards at Walsall Manor Hospital are being asked to stay away due to an outbreak of a vomiting bug.
All wards at the hospital have been closed to visitors unless absolutely necessary, until further notice.
Chief executive Michael Scott said the norovirus stomach bug was to blame.
Sue Hartley, director of nursing, said it was a temporary measure. People can still attend their outpatient appointments.
She said: "This temporary measure is to contain the virus on wards already affected and protect the health of all or our patients, their relatives, carers and their friends."
Immediate family members will be allowed in critical care areas and birthing partners allowed into maternity.
In paediatric wards, immediate parents or designated carers only are allowed.