Mathmatical operators in VBA code

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I copied the following formula from a proc I had that checked for positive
values in a range with some numeric values and deletes the entire row if not
positive numeric value - this I want to work similarly if the value is NOT
101 - I first had it backwards, and it deleted all rows that HAD 101 in the
range - exactly the opposite what I wanted it to do - I figured "Easy just
change the operator from '=' to ' < > ' - but it went into a loop here is
code:
------------------------------------------------------------------------------
--

For Each mvt In Range("Mvt") If mvt.Value = 101 Then
If rangeToSelect Is Nothing Then
Set rangeToSelect = mvt.EntireRow
Else Set rangeToSelect = Union(rangeToSelect, mvt.EntireRow)
End If End If Next If rangeToSelect Is Nothing Then MsgBox
"Handle mvt 101" 'Show message Else:
rangeToSelect.Delete Set rangeToSelect = Nothing End If


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-toolkits/200508/1
.



Relevant Pages

  • Mathmatical operators in VBA code
    ... I copied the following formula from a proc I had that checked for positive ... For Each mvt In RangeIf mvt.Value = 101 Then ... If rangeToSelect Is Nothing Then ... Prev by Date: ...
    (microsoft.public.access.devtoolkits)
  • Najdrozsi poslowie traca
    ... proc. ... znalazlaby sie poza Sejmem. ... Prev by Date: ...
    (soc.culture.polish)
  • Re: Where is the history stored (bash)?
    ... >>> where in proc? ... If you're going to use google groups to post, ... #bofh excuse 22: monitor resolution too high ... Prev by Date: ...
    (comp.unix.shell)
  • Re: Higher Order Functions
    ... > callable object (a Proc or Method). ... IMO, ... Prev by Date: ...
    (comp.lang.ruby)