Sounds like a Squash Vine Borer (SVB). Were you plants doing great and then all of a sudden got droopy and died? Did you open up the stems to see if there were any worms in there? You can do a web search for "squash vine borer" and look at the pictures to see if they match what happened to your squash. Of if you took pics you can post them here.
Unfortunately SVBs are hard to control. If you want to use insecticides you have to catch them at a very specific time and the window for control is only a few hours to a couple of days. Basically you have to hang around your garden full time until you see the flying SVBs, then spray them. If you're not there at just the right time you won't get a second chance.
If you notice the entry wounds in the vines early enough you can try digging the worm out of the stem, but there's no guarantee that won't kill your plants anyway.
You can also try not growing any squash, pumpkin, cucumbers or similar vegetables for a couple of years. But again there is no guarantee that will work. The problem is that they can fly quite a ways and are only vulnerable to intervention for a short period of time. So even if you manage to control them in your garden, they can easily migrate from another nearby garden or field.
I've heard of people wrapping the vines in aluminum foil but I've never tried that myself.
I had a SVB problem when I lived in my previous home. After a few years of failing to control the SVBs I just gave up trying to grow anything in that family.
Sorry, I wish I had a good solution.