ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Formatting text that appears in messages (https://www.excelbanter.com/excel-programming/416830-formatting-text-appears-messages.html)

Hennie Neuhoff

Formatting text that appears in messages
 
Hi Guys,
I managed to set the number format in the following code
[cellValue = Format(cellValue, "# ##0.00")], however I would like to
highlight[bold]
and increase the font size as well.
Do you think it's possible??
Tks in advance

Public Sub GetNumBer()
Dim msg, Style, Title
Dim Response, cellValue As Variant
RePeat:
cellValue = Application.InputBox(prompt:= _
"Key in the required numer/amount", _
Title:="AMOUNT OR NUMBER ? ", Left:=300, _
Top:=250, Type:=1)
If TypeName(cellValue) = "boolean" Then Exit Sub
cellValue = Format(cellValue, "# ##0.00")
msg = "The number you entered was:" _
& Chr(13) & Chr(13) _
& Chr(9) & cellValue & Chr(13) _
& Chr(13) & "Do you want to continue ? "
Style = vbYesNo + vbExclamation + vbDefaultButton1
Title = "Confirm your input!"
Response = MsgBox(msg, Style, Title:=Title)
If Response = vbYes Then
ActiveCell.Value = Val(cellValue)
Else
ActiveCell.ClearContents
GoTo RePeat
End If
Exit Sub
End Sub
--
HJN


All times are GMT +1. The time now is 03:31 AM.

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