Can anyone advise me as to how this happened and how I can stop it from happening again? Thank you
Rather difficult, based on the lack of information.
- What OS are you using? is it up to date?
- What avast! version and VPS file (virus database) number, e.g. 0436-4 (see about avast!)
- What was the virus name, what was the filename, where was it found
If you still had Norton on your system and installed avast! many of the component parts of avast would not have been enabled to avoid conflict. Two resident AVs can cause conflict.
There is plenty of professional help available here, the only difference, you won't have to pay for it here. This really should have been your first port of call.