Formatting text that appears in messages

H

Hennie Neuhoff

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

speed up export to text 3
Changes in How Code Acts After Upgrade of Excel 2
Workbook reminder 0
MsgBox Screen Position 2
Workbook_BeforeSave Event 4
SAVE AS MACRO 6
how to store user responses 2
SAVE AS MACRO 4

Top