Solved

Large Warning Messages

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

Industry Leaders: 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

Suggested Solutions

Title # Comments Views Activity
Copy a row 12 69
Getting warning: You are about to delete 1 row(s) 9 53
how to know if my Checkbox is True in VB6.0? 9 65
Set email body to html using vbscript 6 70
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
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…

685 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