View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Philip Philip is offline
external usenet poster
 
Posts: 156
Default Simple Calculation

Hi,

what are you trying to test?

In your code you basically are saying this:

If textbox1 + textbox 2 = textbox1 then ...

this test will only return true if either textbox 1 or textbox 2 are empty
(of it they're numeric, equal to zero)

are you trying to see if one is empty?

HTH

Philip

"Lucifix" wrote:


Hi,

becouse I newbie this question might sound little stupid :)

In VBA I created UserForm where I inserted three TextBoxes:
- TextSkupajDDV
- TextBrezDDV
- TextSkupajZDDV

I created formula that would check if the statemant is right:

Private Function IzracunDDV()

If (TextSkupajDDV + TextBrezDDV= TextSkupajZDDV) Then
IzracunDDV = False
Exit Function
End If

Application.ScreenUpdating = True
IzracunDDV = True
End Function


Can you please tell me what I did wrong, becouse it is not currect :(


--
Lucifix
------------------------------------------------------------------------
Lucifix's Profile: http://www.excelforum.com/member.php...o&userid=29179
View this thread: http://www.excelforum.com/showthread...hreadid=495452