School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!
You're Browsing As A Guest! Register Now...
Become an Expert!

Join 357,969 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,563 people online right now.Registration is fast and FREE... Join Now!



How to format text in bold italic and align in VB msgbox

52 Weeks of Code Challenge: Android

Week #11 of the 52 Weeks of Code Challenge is Android, you should give it a shot. Click Here!

How to format text in bold italic and align in VB msgbox Rate Topic: -----

#1 snglvl  Icon User is offline

  • New D.I.C Head
  • Pip

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 29-October 09


Dream Kudos: 0

Posted 29 October 2009 - 04:12 AM

Hi, I need to highlight the message in Message box as it indicates the possibility of loss of data :rolleyes: . I need to highlight "You are about to delete the sheet" in bold and all the sentences center aligned. How to do??? Suggestions please... :D

Sub SHEETDEL()
Dim response As VbMsgBoxResult
	If Cells(ActiveCell.Row, 1).Value = "" Then
		MsgBox "ERROR: EMPTYCELL", vbOKOnly
	ElseIf ActiveCell.Row = 1 Then
		MsgBox "ERROR: HEADER ROW", vbOKOnly
	Else
response = MsgBox("You are about to delete the sheet " _
& Cells(ActiveCell.Row, 1).Value & vbCr & "Are you sure?", vbYesNo, "Delete Sheet???")
If response = vbYes Then
	Application.DisplayAlerts = False
	Sheets(Cells(ActiveCell.Row, 1).Value).Delete
	Application.DisplayAlerts = True
	Rows(ActiveCell.Row).EntireRow.Delete
Else
	MsgBox "Thank You!!!"
End If

End If
End Sub


Was This Post Helpful? 0
  • +
  • -


#2 AdamSpeight2008  Icon User is offline

  • The Bandido Coder
  • Icon

Reputation: 224
  • View blog
  • Posts: 3,485
  • Joined: 29-May 08


Dream Kudos: 4100

Expert In: vb.net, LINQ

Re: How to format text in bold italic and align in VB msgbox

Posted 29 October 2009 - 09:49 AM

You can't.
Was This Post Helpful? 0
  • +
  • -

#3 felixtgomezjr  Icon User is offline

  • D.I.C Head
  • Icon

Reputation: 3
  • View blog
  • Posts: 62
  • Joined: 04-November 09


Dream Kudos: 50

Re: How to format text in bold italic and align in VB msgbox

Posted 16 November 2009 - 06:45 PM

The way to do it is to make your own message box. Make a form modular.

I hope that will help.
Was This Post Helpful? 0
  • +
  • -



Fast Reply

  

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month