The Y (3940), Z(3930) and the X(4160) as dynamically generated resonances from the vector-vector interaction Abstract We study the vector-vector interaction within the framework of the hidden gauge formalism for the channels with quantum numbers Charm C = 0 and Strangeness S = 0 in the energy region around 4000 MeV. By looking for poles in the complex plane we find three resonances that could be identified by the mass, width and quantum numbers with the Y (3940), Z(3940) and X(4160), these poles appear with isospin I = 0 and J P C = 0 ++ , 2 ++ and 2 ++ respectively. Whereas the Y (3940) and Z(3940) are coupled more strongly to D * D * , the X(4160) is basically a D * sD * s molecular state. Another two extra resonances appear in our approach with I = 0, 1 and J P C = 1 +− , 2 ++ which are not found in the PDG with masses M = 3945, 3912 MeV and widths Γ = 0, 120 MeV respectively.