DW Faisalabad New Version

DW Faisalabad New Version
Please Jump to New Version
  • Working with Tables
  • While there are four types of database objects in Access, tables are arguably the most ... read more

    Monday, 10 July 2017

    MsgBox

    The MsgBox is a dialog box in Excel VBA you can use to inform the users of your program. Place a command button on your worksheet and add the following code lines:

    1. A simple message.



    Result when you click the command button on the sheet:



    2. A little more advanced message. First, enter a number into cell A1.



    Result when you click the command button on the sheet:



    Note: we used the & operator to concatenate (join) two strings. Although Range("A1").value is not a string, it works here.

    3. To start a new line in a message, use vbNewLine.



    Result when you click the command button on the sheet:

    .