We help IT Professionals succeed at work.

how to increase character limit for visual basic alert boxes

I have the following code:

If Not strValidate ="" Then
    alert("The following information is required:" + vbLf + strValidate)
    ValidateDocument = False
    Exit Function
End If

The variable "strValidate" contains a long number of characters, so when the alert box shows, it doesn't show the whole string, the remaining characters are cut off on the alert box.
Watch Question

You could create your own alert box. Create a large form (let's call it MyForm for purposes of discussion). Put a large Label (let's call it Label1 for discussion) on the form and set wordwrap for the label to true. You can set whatever font and color you liek for this label. You can create another label above Label1 and set it to "The following information is required:" during design time. Put whatever buttons you want on the form, such as an OK button with the button click code
Unload MyForm
 Set MyFOrm = nothing
Then just add
Load MyForm
MyForm.Label1 = strValidate
to your program to display the form.
It has been a month since I submitted a silution to this. I have not gotten an answer yes or no on whether my solution is acceptable. Can I get some response?


Havent tested the solution.