An investigation is carried out on the Wilson-Bappu effect in the MgII K line at 2796.34{AA}. The work is based on a selection of 230 stars observed by both the IUE and HIPPARCOS satellites, covering a wide range of spectral types (F to M) and absolute visual magnitudes (-5.4<=M_V_<=9.0). A semi-automatic procedure is used to measure the line widths, which applies also in the presence of strong central absorption reversal. The Wilson-Bappu relationship here provided is considered to represent an improvement over previous recent results for the considerably larger data sample used, as well as for a proper consideration of the measurement errors. No evidence has been found for a possible dependence of the WB effect on stellar metallicity and effective temperature.