We have a custom messagebox. Due to the fact of company logo, colors etc. Can't get away from that.
the code on the form is
Private Sub Form_Load()
On Error GoTo ERR_SUB
Me.lblMessage.Caption = Me.OpenArgs 'Value which is passed in
Sometimes the data is large (number of characters) I want to pass. I get an error that the OpenForm Action was cancelled.
I'm not sure if this is due to the string limitation (255) or that it's displaying in a label or both. The individual lines have vbCrLf so the display is nicely formated. Is my limitation the string length? The caption length? Should I use a textbox? Or should I change it to a ListBox?
Well, the openargs is not limited to 255 characters, so that can't be it. I'm guessing something else is going on, perhaps there is code you are not showing us?
And note, if your form is allready open in design mode, because your testing or similar, then the OpenArgs are NOT passed to the form. So make sure your form is properly closed, before testing it.
Jeffrey Coachman
And lets be clear, ...the title here is a bit misleading, ...
This is not a "messagebox" (object), ...it seems to be a form with custom text that appears in a label...
Note here that you are not giving us an example of this mystery, long, string, ...or telling us how you are incorporating the vbcrlf...
Can you post the entire code please?
There are many reasons why the load event could be canceled.
And note, if your form is allready open in design mode, because your testing or similar, then the OpenArgs are NOT passed to the form. So make sure your form is properly closed, before testing it.