VBA use of Abs(Me.SomeNumber)

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top