When you build your lines, you can insert them at the beginning and at the end with spaces to achieve the target length. If you use excel, the rept function is convenient for this purpose.
function pad_n_center(byval mystring as string, lenmax as integer) as string dim pad_by as integer dim pad as string pad_by = (lenmax - len(mystring))/2 'some more code to finesse that? pad = worksheetfunction.rept(" ",pad_by) pad_n_center = pad & mystring & pad end function
As mentioned earlier, if msgbox still doesn't look good, you can use a text box shape object (or other objects) to get the desired effect.
source share