Thanks, that worked.
Glad you've sorted it. For the record there are a few other useful wallets commands that hopefully you won't need but are good to know:
-repairwallet
-salvagewallet
-zapwallettxes (fixes useless stuck and conflicted unconfirmed transactions from attempted double spends etc)