View Single Post
 
Old 02-29-2020, 02:36 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Relatively simple? No

You could probably change the Windows dialog font to Courier if it was that important to align text with spaces. You could also use tabs if the lengths are close
Code:
msg = Left("  Text      ", 10) & Left(" Value   ", 8) & vbCr _
    & t1 & vbTab & Format(d1, "000.00") & vbCr _
    & t2 & vbTab & Format(d2, "000.00") & vbCr _
    & t3 & vbTab & Format(d3, "000.00")
MsgBox msg
But the right way to do it would be using a UserForm and listbox control.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote