Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 02-29-2020, 02:36 PM
Guessed's Avatar
Guessed Guessed is offline Is there any way to get MsgBox columns to line up? Windows 10 Is there any way to get MsgBox columns to line up? Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,161
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
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Match to columns and then copy line to second list. Borut2019 Excel 0 02-18-2019 01:04 AM
Is there any way to get MsgBox columns to line up? Problem with Msgbox in VBA Puzzled Programmer Excel Programming 6 09-06-2018 04:34 PM
Is there any way to get MsgBox columns to line up? columns in last table row don't line up mavisgold Word 1 03-26-2017 02:32 AM
Formatting the line between columns in Word Mac 2011 bpanda Word 1 06-03-2013 07:52 PM
Is there any way to get MsgBox columns to line up? Make MsgBox appear... Jamtart PowerPoint 3 09-01-2012 08:21 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:23 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft