How to Format Decimal Places in Visual Basic

104 49
    • 1). Click the Windows "Start" button and select "All Programs." Click "Microsoft .NET Framework," then click "Visual Studio." Open your VB project.

    • 2). Double-click the form you want to edit. Double-click the control on the form that contains your decimal number. The code editor opens to the control's source code.

    • 3). Type the following code to format the decimal:

      textbox = FormatNumber(decimal_number, 5)

      In this example, a decimal number is formatted to five decimal places and the result is displayed in a Visual Basic text box.

Source...
Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time

Leave A Reply

Your email address will not be published.