When a successor to the office has been duly elected .
When a successor to the office has been duly appointed according to law .
when a successor to the office has been duly elected or appointed according to law .