The nearest was when home rule for Greenland began in 1979, it held a new referendum and voted to leave the EEC, as the EU was known then. But of course it was a territory and not a fully fledged country.
They also had a tough departure experience, it wasn't completed until 1985, making our...