---
title: "NumericUpDown Control in VB.Net"  
description: "NumericUpDown is basically countered that the user can input a number within the specified range. With the Help of NumericUpDown Control, we can ent"  
author: "Pushpendra Singh"  
published: 2010-12-14  
updated: 2020-03-04  
canonical: https://www.mindstick.com/articles/309/numericupdown-control-in-vb-dot-net  
category: "vb.net"  
tags: ["vb.net"]  
reading_time: 2 minutes  

---

# NumericUpDown Control in VB.Net

NumericUpDown is basically countered that the user can input a number within the [specified range](https://www.mindstick.com/forum/160084/describe-the-sql-between-operator-how-it-can-be-used-to-search-for-data-within-a-specified-range). With the Help of NumericUpDown Control, we can enter numeric values, with advanced [features](https://yourviews.mindstick.com/view/86404/best-5-rolls-royce-cars-to-buy-with-features-and-price) like up-down buttons and accelerating auto-repeat.\

## How to use NumericUpDown Control

[Drag and drop](https://www.mindstick.com/forum/454/how-to-drag-and-drop-multiple-image-from-one-canvas-to-onther-canvas-in-html5) NumericUpDown Control from the toolbox on [window Form](https://www.mindstick.com/forum/527/how-to-pass-datagridview-s-cells-value-to-another-window-form).

![NumericUpDown Control in VB.Net](https://www.mindstick.com/mindstickarticle/c214b1ce-3982-40cb-b395-5cdaa2bfd573/images/932225b7-c5ca-4b96-8f13-64c3bfa61963.png)

## Code:

```
Public Class Form12     Private Sub NumericUpDown1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)  Handles NumericUpDown1.ValueChanged         'NumericUpDown valu will show in TextBox         TextBox1.Text = NumericUpDown1.Value     End SubEnd Class
```

By Default Maximum and Minimum value in NumericUpDown Control is set 100 and 0 respectively. You can also set Maximum and Minimum value in [NumericUpDown Control](https://www.mindstick.com/articles/629/read-microsoft-word-document-file-by-using-c-sharp). To show the value in NumericUpDown.

**Run the project**

![NumericUpDown Control in VB.Net](https://www.mindstick.com/mindstickarticle/c214b1ce-3982-40cb-b395-5cdaa2bfd573/images/323ecfe6-97aa-4f79-a1ad-ea45730ae79a.png)

When you select the value in NumericUpDown1 then the ValueChanged event will fire and [selected value](https://www.mindstick.com/forum/525/get-selected-value-of-datagridviewcomboboxcolumn) will show in the TextBox.

![NumericUpDown Control in VB.Net](https://www.mindstick.com/mindstickarticle/c214b1ce-3982-40cb-b395-5cdaa2bfd573/images/ee634ee7-9d6a-460a-97c0-6b3971ea2aec.png)

**NumericUpDown Control [Properties](https://yourviews.mindstick.com/view/81845/now-it-s-possible-to-predict-properties-of-any-molecule)**

**DecimalPlaces:** Gets or sets the number of [decimal places](https://www.mindstick.com/forum/33881/round-double-type-variable-to-two-decimal-places-in-c-sharp) to display in NumericUpDown Control.

**UpDownAlign:** Set positions the arrow buttons on the left or the right side of the NumericUpDown. [Default value](https://www.mindstick.com/forum/23023/default-value-when-using-singleordefault) is Right.

**Increment:** Gets or sets the value to increment or decrement the NumericUpDown.

```
Private Sub Form12_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load        'Increment the NumericUpDown value          NumericUpDown1.Increment = 5End Sub
```

NumericUpDown value will be inrement 5 at each up [button click](https://www.mindstick.com/forum/568/check-condion-before-post-page-on-button-click-in-jquery-or-javascript).

![NumericUpDown Control in VB.Net](https://www.mindstick.com/mindstickarticle/c214b1ce-3982-40cb-b395-5cdaa2bfd573/images/ee634ee7-9d6a-460a-97c0-6b3971ea2aec.png)

**Hexadecimal:** Hexadecimal property used to show value in Hexadecimal format in NumericUpDown. Default value is false.

```
Private Sub Form12_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load         ' allow to show value Hexadecimal format         NumericUpDown1.Hexadecimal = True End Sub
```

\

![NumericUpDown Control in VB.Net](https://www.mindstick.com/mindstickarticle/c214b1ce-3982-40cb-b395-5cdaa2bfd573/images/787bf9d9-a066-437e-bcc7-2054697b1a78.png)

---

Original Source: https://www.mindstick.com/articles/309/numericupdown-control-in-vb-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
