Ni2MnGa and Co2MnGa compounds were investigated by using state-of-the-art computational ab-initio methods. The total energy calculations for the cubic and the tetrahedral structures, band structure together with suspensibility investigations were performed. The results of our investigations exhibited the dependence of magnetic properties of the compounds on their geometrical structure. The influence of Co and Ni on the magnetic properties of the compounds was disclosed, too.