VBA use of Abs(Me.SomeNumber)

  • Thread starter Thread starter Wayne-I-M
  • Start date Start date
W

Wayne-I-M

Hi

Simple question (I hope). Does this give a "true" negative number or just
format the number as a negative.

Private Sub ItemConvertBut_Click()
If Me.ItemCost > 0 Then
Me.ItemCost = -ItemCost
Else
Me.ItemCost = Abs(Me.ItemCost)
End If
End Sub

I have a number with a small button next to it. When clicked it should
convert it to a negative - eg. The amount may be a cost or a discount

Many thanks
 
Back
Top