This part of code:
Dim ask As String
If TextBox1.Visible = False Then
ask = InputBox("Enter Income Name")
If ask.Length <> 0 Then
TextBox1.Visible = True
Label1.Visible = True
Label1.Text = ask
Plus1.Visible = False
Negative1.Visible = True
Else
Exit Sub
End If
End If
move to another procedure/function, like that:
Private Sub DoSomething()
Dim ask As String, bRetVal As Boolean
If TextBox1.Visible Then Exit Sub
ask = InputBox("Enter Income Name")
bRetVal = (ask.Length > 0)
TextBox1.Visible = bRetVal
Label1.Visible = bRetVal
Label1.Text = bRetVal
Plus1.Visible = bRetVal
Negative1.Visible = bRetVal
End Sub
After that, call it:
Private Sub Plus1_ClickButtonArea(Sender As Object, e As MouseEventArgs) Handles Plus1.ClickButtonArea
DoSomething()
End Sub
Note: Please, have a look at
DoSomething()
procedure. Do you see the difference between your and mine code?