I don't actually have any code that's good for a beginner, but I have some general advice which is to experiment, never be afraid to try something just because you don't know whether or not it's right, have a look at the object browser and see what objects and commands are there and see if you can make them work. The best way to learn is by trial and error.(buy books as well though, they're helpfull to)