How to declare and capture the value from a numeric up down in visual studio

188 Views Asked by At

Good Morning SO,

I have a question and I know this is probably programming 101, but I am having trouble declaring a variable and then capturing its value to display in a label for further use in the application. I created an numeric up/down to limit the number of entries by the user. Now I just need to declare the variable and be able to display it on label16... I can't get it to work, I think its my syntax but I am not quite sure. In any case here is my code. I would really appreciate your help.

`'This textbox requests input from user in the form of numbers representing Hours of Operation Used'
Private Sub HoursOfOperation_ValueChanged(sender As Object, e As EventArgs) Handles HoursOfOperation.ValueChanged, HoursOfOperation.Click
    Dim hoursSelected As Object = Nothing
    Dim InthoursSelected = hoursSelected
    label16.Text = hoursSelected.ToString
End Sub` 
0

There are 0 best solutions below