It doesn’t matter if they’re VFR or IFR or even if they're in contact with ATC. Using squawk codes directly depends on the aircraft’s communication ... getting on the radio and making ...
A Washington, D.C.-area helicopter pilot says Army Black Hawk was flying published route and on appropriate radio frequency.