Go Back   Access World Forums > Microsoft Access Reference > Code Repository

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 02-07-2012, 12:49 PM   #1
NigelShaw
Newly Registered User
 
NigelShaw's Avatar
 
Join Date: Jan 2008
Location: Leicester UK
Posts: 1,562
Thanks: 8
Thanked 69 Times in 45 Posts
NigelShaw is on a distinguished road
Bold Message

Hi,

here is something i found a while ago and put into a neat little routine. It allows bold text in a standard messagebox!

Code:
Public Sub BoldMsg(BoldText As String, PlainText As String, CaptionText As String)

Eval ("MsgBox ('" & BoldText & " @ " & PlainText & "@@',0,' " & CaptionText & "')")

End Sub
to use, call ( example )-

Code:
Call BoldMsg ("This is Bold", "This is Plain", "This is a caption")



thanks

Nigel
Attached Images
File Type: jpg bold.JPG (14.7 KB, 841 views)

__________________
Never, ever, argue with an idiot. They'll drag you down to their level and beat you to death with experience!

If i have helped you in any way, please tip my scales or say a little thanks
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Chars

Checkout my splash screen tool
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
for a free download.
NigelShaw is offline   Reply With Quote
The Following 2 Users Say Thank You to NigelShaw For This Useful Post:
AmyLambes (03-25-2012), plierpuller (10-18-2012)
Old 03-14-2018, 01:25 AM   #2
isladogs
Part time moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 6,614
Thanks: 90
Thanked 1,620 Times in 1,509 Posts
isladogs is just really nice isladogs is just really nice isladogs is just really nice isladogs is just really nice isladogs is just really nice
Re: Bold Message

Just clicked on this old post.

The following code (not mine) expands the idea further to include message box icons and more than one button. You can also include context help items though I've never done so

Code:
Public Function FormattedMsgBox(Prompt As String, Optional Buttons As VbMsgBoxStyle = vbOKOnly, _
 Optional title As String = vbNullString, Optional HelpFile As Variant, Optional Context As Variant) As VbMsgBoxResult

On Error GoTo Err_Handler
 
 'Taken from http://www.trigeminal.com/usenet/usenet015.asp
 
        FormattedMsgBox = Eval("MsgBox(""" & Prompt & _
         """, " & Buttons & ", """ & title & """)")
    
Exit_Handler:
    Exit Function

Err_Handler:
    MsgBox "Error " & Err.Number & " in FormattedMsgBox procedure : " & vbCrLf & "   - " & Err.Description
    
    Resume Exit_Handler
    
End Function
For example (here its used with a function GetLatestWebVersion):
Code:
FormattedMsgBox "Currency Exchange Rates Tracker version " & GetLatestWebVersion () & " is now available for download       " & vbCrLf & _
                    "from the Mendip Data Systems website           " & _
                    "@Click YES to close the program and download the latest version now          " & vbCrLf & _
                    "Click NO if you want to download this later          @", _
                        vbExclamation + vbYesNo, "New version available"


I've included this as one of the methods for getting users' attention in an example database
https://www.access-programmers.co.uk...d.php?t=295342
Attached Images
File Type: png FormattedMsgBox.PNG (7.7 KB, 229 views)
__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Web links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Colin
Previously known as ridders : Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Last edited by isladogs; 03-15-2018 at 04:42 AM.
isladogs is offline   Reply With Quote
The Following User Says Thank You to isladogs For This Useful Post:
Minty (04-27-2018)
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Value is bold red if = 1 amerifax Forms 7 04-18-2011 09:14 AM
Bold Textboxes ewong1 Forms 4 07-06-2005 10:01 AM
Bold text in Vb Groundrush Modules & VBA 3 01-19-2004 12:14 PM
Bold time dan-cat Modules & VBA 1 10-03-2002 10:45 AM
making text bold in message boxes andy mac Forms 4 08-22-2001 04:24 PM




All times are GMT -8. The time now is 04:06 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World