No, I do not believe that they are the solution.
There are two ways in which having guns would help: deterring the criminals, or killing them while they are committing the crime.
In terms of killing the gunman while he is committing the crime, I believe that having an armed police officer might be able to save a few lives. The problem with this approach is that the gunman must already be killing people in order for the guards to react. There was an armed guard at Columbine. His actions might of saved several lives, but 13 people were already dead. In terms of saving lives, armed guards might help, but in terms of preventing mass murders, they will simply not be able to stop one from occurring.
The second topic is that of deterrence. Having armed guards are good at deterring criminals who plan on staying alive, or people who value there own lives. It will deter people such as robbers, thieves, rapists, some murderers who are out to kill specific people, etc. However, the people who are the cause of the “insane gunman” scenario do not value their own lives. They do not plan on leaving the scene alive, and they do not want to leave the scene alive. They often commit suicide immediately following the crime. So, I don’t think that they will acknowledge any amount of deterrence.