It's funny you tell that story, and it does work great.
We did the same thing with lady bugs in our windows. One year we had millions of the little critters, and wanted to save them. So out came the shop vac and they went outside.
I have also used it on mice, but they are much harder to catch.