Edit

Share via


Use Message Boxes to Return Values

One way to isolate errors is to use a message box to display the value of a variable or property at a particular point in the code. This code example shows the selection length returned from the TextBox.SelLength property in a message box.

MsgBox Item.GetInspector.ModifiedFormPages("Test").Textbox1.SelLength

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.