What operating system are you using?
Any error messages?
If you look under Control Panel in Scanners and Cameras is the HP C5240 listed?
Try going to Device Manager and under"Imaging Devices" find the HPC5240 and right click and delete. Reboot with scanner connected and reinstall the driver.