if I write 500 in a textbox then a label.caption show "Profit". If I write -500 the the label.caption show Loss. I write code

If Format(Text1, "0000000") Then Label1.Caption = "Profit"

but for -500 what I need to write?

If Val(Text1.Text) < 0 Then
  Text1.Text = "-" & Text1.Text
Else
  '...

Good Luck

You can do it by one line , if you get the Profit base to a variable then

Dim a As Integer
a = 500
If Text1.Text <= a Then Label1.Caption = "Loss" Else Label1.Caption = "Profit"
commented: SolVed +1