Solved

Large Warning Messages

Posted on 2000-04-07
5
140 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

752 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