A method for gearchange in a gearbox of a vehicle driving, said vehicle having a propulsion system comprising a combustion engine with an output shaft, a gearbox with an input shaft, an electric machine comprising a stator and a rotor, an a planetary gear comprising three components in the form of a sun gear, a ring gear and a planet wheel carrier, the output shaft of the combustion engine being connected to a first of said components of the planetary gear so that a rotation of this shaft results in a rotation of this component, the input shaft of the gearbox being connected to a second of said components of the planetary gear so that a rotation of this shaft results in a rotation of this component and the rotor of the electric machine being connected with a third of said components of the planetary gear so that a rotation of the rotor results in a rotation of this component, said propulsion system further comprising a locking means transferable between a locking position in which two of said components are interlocked so that the three components rotate with the same rotational speed and a releasing position in which the components are allowed to rotate with different rotational speeds, characterised in that the method is carried out so that the gearchange is carried out with the locking means in the releasing position, and that it comprises the following steps: a) controlling the combustion engine to bring the first component towards the rotational speed the input shaft of the gearbox shall have so as to for existing speed of the vehicle be synchronized with the shaft rotational speed for a gear to be engaged in the gearbox, b) controlling the electric machine towards a state in which it together with the combustion engine applies a zero torque to the input shaft of the gearbox, c) disengaging the gear engaged in the gearbox when said zero torque has been obtained, d) controlling the electric machine to apply a torque to the input shaft of the gearbox so as to bring this shaft to a rotational speed which for the existing speed of the vehicle is synchronized with the shaft rotational speed for the gear to be engaged in the gearbox. e) when said synchronized rotational speed is on the way to be reached starting a gearengaging procedure while simultaneously controlling the electric machine towards obtaining a zero torque at the time for a completion of said gearengaging procedure, f) controlling the electric machine to apply propulsion system torque requested on the input shaft of the gearbox, in which the step a) is carried out in parallel with the steps b)-f), g) transferring said locking means to a locking position when the rotational speed of the first component connected to the output shaft of the combustion engine has reached the rotational speed of the input shaft of the gearbox, h) controlling the electric machine and the combustion engine to apply the torque requested from each of them on the input shaft of the gearbox. a) controlling the combustion engine to bring the first component towards the rotational speed the input shaft of the gearbox shall have so as to for existing speed of the vehicle be synchronized with the shaft rotational speed for a gear to be engaged in the gearbox, b) controlling the electric machine towards a state in which it together with the combustion engine applies a zero torque to the input shaft of the gearbox, c) disengaging the gear engaged in the gearbox when said zero torque has been obtained, d) controlling the electric machine to apply a torque to the input shaft of the gearbox so as to bring this shaft to a rotational speed which for the existing speed of the vehicle is synchronized with the shaft rotational speed for the gear to be engaged in the gearbox. e) when said synchronized rotational speed is on the way to be reached starting a gearengaging procedure while simultaneously controlling the electric machine towards obtaining a zero torque at the time for a completion of said gearengaging procedure, f) controlling the electric machine to apply propulsion system torque requested on the input shaft of the gearbox, in which the step a) is carried out in parallel with the steps b)-f), g) transferring said locking means to a locking position when the rotational speed of the first component connected to the output shaft of the combustion engine has reached the rotational speed of the input shaft of the gearbox, h) controlling the electric machine and the combustion engine to apply the torque requested from each of them on the input shaft of the gearbox.