Click here to Skip to main content
15,892,927 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
VB
Protected Sub ButtonAdd_Click(sender As Object, e As EventArgs)
       a = a + 1
       If a <= 8 Then
           AddNewRow()
       Else
           lblmsg.Text = " You can set only 8 Objectives"
       End If

   End Sub
Posted
Comments
Gitanjali Singh 31-Jan-14 6:08am    
Please post the code of function AddNewRow().
TrushnaK 31-Jan-14 6:08am    
where you set variable a.
is it global
Did you debug your code? Once a becomes 9, it will set Text in the Label.
King Fisher 31-Jan-14 6:31am    
a 's value?

1 solution

show some code for addnewrow() , also see that if your value of a > 8 than only it will run the else part.


what is the value of a in your case ?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900