ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Formatted popup window (https://www.excelbanter.com/excel-programming/368550-formatted-popup-window.html)

DoctorG

Formatted popup window
 
I need to present a set of Legends + numbers to the user upon clicking a
button. The MsgBox window cannot be formatted (to my knowledge) i.e. to
justify numbers on consecutive lines regardless of font and preceding text.

Does anybody know of another method of popping up a "properly formatted"
window to the user with just an OK / Close button as an option?

Thanks in advance

Excelenator[_10_]

Formatted popup window
 

Can you post what you want in the message box? You MIGHT be able to use
message box for this. I've had some success with formatting text within
them.


--
Excelenator


------------------------------------------------------------------------
Excelenator's Profile: http://www.excelforum.com/member.php...o&userid=36768
View this thread: http://www.excelforum.com/showthread...hreadid=565648


DoctorG

Formatted popup window
 
Try this :

Total Hours worked = 999.9
------------------------------------
Normal Hours = 999.9
Overtime = 999.9
Saturdays = 999.9
Sundays = 999.9

This is a popup window to display the analysis of the total hours worked for
a given person. If I could use the Courier font which is a fixed width font,
I could get away with it. But a proportional font messes things up and
nothing can be aligned from one line to the next.

I am anxious to see what you can do with it!!
Thanks in advance for your time.

"Excelenator" wrote:


Can you post what you want in the message box? You MIGHT be able to use
message box for this. I've had some success with formatting text within
them.


--
Excelenator


------------------------------------------------------------------------
Excelenator's Profile: http://www.excelforum.com/member.php...o&userid=36768
View this thread: http://www.excelforum.com/showthread...hreadid=565648



Excelenator[_12_]

Formatted popup window
 

How about this? The only issue might be that the numbers will appear to
be aligned to the left instead of the right as you might expect them to
be if they change from what I am assuming is mock up data that you
supplied.


Sub MsgBxTest()

MsgBox "Total Hours Worked" & vbTab & "=" & vbTab & "999.99" & vbCrLf
_
& "----------------------------------------------------" & vbCrLf
_
& "Normal Hours" & vbTab & vbTab & "=" & vbTab & "999.99" & vbCrLf
_
& "Overtime Hours" & vbTab & vbTab & "=" & vbTab & "999.99" &
vbCrLf _
& "Saturday Hours" & vbTab & vbTab & "=" & vbTab & "999.99" &
vbCrLf _
& "Sunday Hours" & vbTab & vbTab & "=" & vbTab & "999.99"



End Sub


--
Excelenator


------------------------------------------------------------------------
Excelenator's Profile: http://www.excelforum.com/member.php...o&userid=36768
View this thread: http://www.excelforum.com/showthread...hreadid=565648



All times are GMT +1. The time now is 12:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com