How can I prevent my Macbook Pro 2011 from going to sleep when I close the lid?
The laptop will automatically go to the default sleep mode when closed unless it is plugged into power. Once plugged in, you will be able to run it to the monitor, wireless mouse, etc.