After years of study there is now strong support that many coronal mass ejections are caused by the eruption of a magnetic flux rope from the solar atmosphere. Convergence of opposite polarity magnetic fragments along a polarity inversion line in the photosphere, and their subsequent magnetic reconnection, supports the formation of flux ropes in a manner following the model of van Ballegooijen and Martens (1989). Following this, the observations suggest that flux ropes may evolve their specific magnetic configuration and that they may only be stable on the Sun for a few hours before they erupt as a CME, in line with the latest theoretical and modelling expectations. This talk will look at the formation and evolution of these twisted magnetic field configurations in a selection of active and quiet sun regions. Including the formation of a flux rope that was associated with the very massive coronal mass ejection of June 7th, 2011.