This very scenario happened to me as I was about to ask for joining instructions at my home airfield (radio aircraft only airfield no radar). In the heat of the moment I couldn't remember whether to squawk 7600 or 7500 and since I didn't want to be met by all three emergency services and an armed response team I decided to see if I could find the problem. Discovered wire had come off the PTT switch so Dad (who was my passenger) leant me his Swiss army knife I peeled back the insulation and held the ends of the wire together to make my calls.