Solved

Large Warning Messages

Posted on 2000-04-07
5
141 Views
Last Modified: 2010-05-02
I am using a number of large warning messages should certain options be taken.

Is there a way of making something like this:-

"It appears that you are planning on making a major change to the existing data - if you take this option again you will lose ALL existing information"


lok like this
_______________________________________
"It Appears that you are planning on
  making a major change to the
         existing data

 If you take this option again you
            will lose
               ALL
      Existing information"
---------------------------------------
Basically what I am after is to use multiple lines of text to form the warning in the msgbox, rather than one line of text that autowraps and quite honestly looks poor.
0
Comment
Question by:Mister_Simon
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 5

Expert Comment

by:Voodooman
ID: 2692761
Hi!

Make your own message boxes!

Create a form that looks how you want - put a label on it and set the align to centre.


'all form code
Option Explicit

Public FormCaption As String
Public Message As String


Private Sub B_OK_Click()

Unload Me

End Sub

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)

If KeyCode = vbKeyO Then B_OK_Click
End Sub

Private Sub Form_Load()

L_Caption.Caption = Message
Me.Caption = FormCaption
End Sub

This form has a button and a label on it.



Set up a global function and call the message box - here is a big Yes No message box.

Sub BigIMessage(Message As String, Title As String)

F_MsgBoxOK.Message = Message
F_MsgBoxOK.FormCaption = Title
F_MsgBoxOK.Show 1

end sub


'Call it

BigImessage "No Recs Exist!","Error"

You can have as many different Msgboxes as you want - I keep them and reuse them!


Good Luck


Voodooman!
0
 
LVL 3

Accepted Solution

by:
Gordonp earned 25 total points
ID: 2692763
Insert vbCrLf at strategic Points

ie

sMSg = "It Appears that you are planning on" & vbcrlf _
       & "making a major change to the
         existing data" & vbcrlf _
etc..

MSgBOx sMsg

Gordon

0
 

Author Comment

by:Mister_Simon
ID: 2692849
Voodooman,

This is too complicated for my purposes and I am only a VB beginner.

I am using Gordonp's answer as this is easy and serves the need perfectly.

Big apologies

Mister Simon
0
 

Author Comment

by:Mister_Simon
ID: 2692853
Cheers Gordy,

That does the job.

Mister Simon
0
 
LVL 3

Expert Comment

by:Gordonp
ID: 2692897
Glad to Help

Gordon
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month10 days, 3 hours left to enroll

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question