The fraudsters are sending fake emails that look like a genuine British Gas bill.
There is a link on it which, if clicked on, installs ransomware on to the computer.
The ransomware locks the computer and the fraudsters then demand money to unlock it.
Detective Inspector Benn Kemp, of West Yorkshire Police’s Cyber Crime Team, said: “This is a nationwide fraud that we are aware of and I would urge people to be on their guard.
“I would ask people to never open an email unless they are certain of the credentials of the sender and to share our message with other people.
“British Gas, for example, always send personal emails and will usually quote the customer’s account number. Their links are always www.britishgas.co.uk. ”
He also advised people to regularly update anti virus software and browsers, avoid public wifi connections when doing things like internet banking and back up all their files.
If you have been affected by this, or any other scam, report it to Action Fraud by calling 0300 123 2040, or visiting www.actionfraud.police.uk/