Abstract. The vertex (resp. edge) metric dimension dim(G) (resp. edim(G)) is the minimum number of vertices of G which distinguish all pairs of vertices (resp. edges) in G by means of distance. It was conjectured that dim(G)\le 2c(G)-1 and edim(G)\le 2c(G)-1, where c(G) is the cyclomatic number of G, and the conjecture was reduced to 2-connected graphs. In the paper we prove the conjecture for Theta-graphs and we characterize all Theta-graphs for which the equality is attained.