Thanks to all for your various replies, none of which (and this is not your fault!) worked:
- TheOfCom advice (HowardML). All good, except that it doesn't work - with Virgin. The 65075 text route produces only the unhelpful message "Sorry we can't give you switching information just now ... call 789," logging on to my online account is impossible: a message saying "Sorry we can't log you on to your account just now," a message I've been getting for at least two months now. And phoning 789 just ends up with the same result: after ages of pratting about by a nice, polite but ultimately ineffective person, it's the same: there is a flag on your account and we have referred this to accounts". They say they will phone back, variously, somewhen unspecified, on "Wednesday or Thursday at the latest" or "tomorrow." They never do.
- The Virgin Media route (Emily_G). It starts promisingly: "Keeping your number is as easy as 1,2,3." But of course it isn't, for the reasons listed above, and I end up in the same bog of misinformation.
As it stands now, I've been told (again!) that it's been referred to accounts because of the damned flag and I will hear in 3-5 working days. I'm not holding my breath.
Meanwhile, another question: what does it mean that "there is a flag on your account"? I have no idea, given that I'm fully paid up on the handset and I was informed months ago that I was out of contract and would have only to give a month's notice to end it. It's not just a mystery but an infuriating mess that there seems no way out of, if want to keep my number, which of course I do, or I'd just cut off payment and dump them that way.