Message Box bewilderment!

Robert Allan

New Member
Joined
Mar 30, 2020
Messages
19
Office Version
  1. 365
Platform
  1. Windows
Message Box bewilderment!​

Still green, still learning. Now I am on Message Boxes. I think I have them petty well figured out, except for formatting. I could not find very much on the actual formatting, except for the following:
VBA Code:
With cFmsgBox
    .Title = "Message Box supporting formatted text. Example 1"
    .Msg = "This is the first " & _
     .b("Test ") & "message spanning over several lines and paragraphs. The default margins, spaces, and font size had been used. " & _
                   "No need to say that the form width had been adjusted manually in order to have an optimum appearance." & _
     .Lf & _
     .Lf & "The formats " & _
     .b("bold") & ", " & _
     .u("underline") & ", and " & _
     .i("italic ") & "and may be combined with any of the colours " & _
     .b(.i(.u(.red("red")))) & ", " & _
     .b(.i(.u(.blue("blue")))) & ", and " & _
     .b(.i(.u(.green("green")))) & "." & _
     .Lf & .Lf & _
           "5 different links may be included in the message text, either in the full form like " & _
     .link("[URL='http://www.google.com']www.google.com[/URL]") & " or with a friendly name like " & .link("[URL='http://www.google.com']www.google.com[/URL]", "google.com") & ", which masks the url behind it." & _
     .Lf & _
     .Lf & _
        "Also it shows 2 of the 6 possible reply buttons and that they may contain any text. Since the number of lines is maximized to 3 their width will be adjusted " & _
        "automatically - but will remain the same for all buttons. The string returned by the display call is identical with the string of the clicked reply button."

    .Reply1 = "Click this reply to continue with the next example"
    .Reply2 = "Click this reply to finish with the Message Box solution's features"
    .Dsply 318

    If .Reply = .Reply1 Then Example2
End With

The thing that I don’t understand about it is how to use the “ .?? (.Lf, .b.)” in this example. If I could figure that out, my problems would be over, and I would have this whole thing about formatting Message Boxes under control. In that example, he petty much has all the bases covered. I did not see any way to get in contact with the guy that put that out there, so I hit a dead end. Obviously I need help.
 
Last edited by a moderator:

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
1. Please post a fuller explanation of your code including everything it takes to make it run so that anyone trying to help you does not need to figure that out
- perhaps you used a class module - if so, post the complete code

2. Post#1 contains a fragment of your code which cannot run without being edited - post the complete procedure

3. Clicking on the <vba/> icon brings up code tags
- posting your code using code tags makes the code much easier to read as it maintains the original VBA layout etc
- please do not format anything within VBA code tags

[ CODE=vba ] paste code here [/CODE ]

Example output which is automatically formatted
VBA Code:
Sub XX() 
    With cFmsgBox
        .Title = "Message Box supporting formatted text. Example 1"
        'etc
    End With
End Sub

.
.


thanks
 
Upvote 0
Where did you find that code?
 
Upvote 0

Forum statistics

Threads
1,214,523
Messages
6,120,047
Members
448,940
Latest member
mdusw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top