A method, similar to the one previously used by the author in his derivation of a generalized classical virial theorem (see ibid., vol.10, no.4, p.507 (1977)), is used to derive a generalized quantum virial equation. This equation is applicable to any part of a larger system of particles. Furthermore, by the introduction of a flux density operator, it is possible to express the quantum surface flux virial in two alternative forms, as easily interpreted as the classical form. As an intermediate result, an equation of continuity for a general one-particle observable is obtained. In an appendix, an equation of motion of the reduced density matrix of the first order is derived.