MIDISetEvent() can delete the currently selected event. You specify the DEL option. Here we delete the currently selected event:
/* Delete the event and check for an error */
err = MIDISetEvent('DEL')
IF err \== "" THEN SAY err
When the currently selected event is deleted, then there is no longer a currently selected event/track. You can then call MIDIGetEvent() to enumerate the next event (after the deleted event) that matches your criteria. For example, here we delete all of the tempo events in a MIDI file:
/* Set all tracks as searchable */
selected = MIDITrack('\')

/* If any tracks have data... */
IF selected \== 0 THEN DO

   /* Keep going until an error */
   DO UNTIL err \== ""

      /* Enumerate the next Tempo event in any one of the search tracks */
      err = MIDIGetEvent('Tempo')

      /* If an event was found, delete it */
      IF err = "" THEN DO
         err = MIDISetEvent('DEL')
            IF err \== "" THEN SAY err
      END

      /* If the error message indicated something
       * other than no more events, display it
       */
      ELSE IF err \== "No currently selected event" THEN SAY "ERROR:" err

   END

END

Deleting an excerpt of events

By passing a second arg to MIDISetEvent(), you can tell it to delete more than one event, starting with (and including) the currently selected event. For example, here we delete 10 events starting with the currently selected event:

/* Delete 10 events */
err = MIDISetEvent('DEL', 10)
IF err \== "" THEN SAY err

Deleting an excerpt by TIME

You can alternately specify a start TIME and an end TIME. All events (in the currently selected track) inbetween the start and end times will be deleted. Before calling MIDISetEvent(), you must specify the start TIME's measure, beat, and clock in the variables MIDIEvent.!Measure, MIDIEvent.!Beat, and MIDIEvent.!Clock. You must specify the end TIME's measure, beat, and clock in the variables MIDIEvent.!Measure2, MIDIEvent.!Beat2, and MIDIEvent.!Clock2. Then, you must specify the TIME and DEL options.

Here we delete all events between the TIME of 1:1:0 and 1:2:0.

/* Delete all events between 1:1:0 and 1:2:0 */
MIDIEvent.!Measure = 1
MIDIEvent.!Beat = 1
MIDIEvent.!Clock = 0
MIDIEvent.!Measure2 = 1
MIDIEvent.!Beat2 = 2
MIDIEvent.!Clock2 = 0
err = MIDISetEvent('TIME | DEL')
IF err \== "" THEN SAY err
RxMIDI will delete all events that have a TIME that is on 1:1:0 or later, up until 1:2:0. (ie, If the event is on 1:2:0, it will not be deleted). This will leave one beat of "silence" in the MIDI file, where no events can be found. If you wish to totally remove this silence (and move all subsequent events forward in TIME), then also specify the CUT option when you DEL:
/* Delete all events between 1:1:0 and 1:2:0 and remove the silence */
MIDIEvent.!Measure = 1
MIDIEvent.!Beat = 1
MIDIEvent.!Clock = 0
MIDIEvent.!Measure2 = 1
MIDIEvent.!Beat2 = 2
MIDIEvent.!Clock2 = 0
err = MIDISetEvent('TIME | DEL | CUT')
IF err \== "" THEN SAY err

Deleting an excerpt by both count and time

You can delete both by count and TIME. For example, here we delete up to 10 events between 1:1:0 and 1:2:0. No events outside of that TIME will be deleted, even if there are less than 10 events between. And no more than 10 events will be deleted even if there are more between those TIMEs.

/* Delete upto 10 events between 1:1:0 and 1:2:0 */
MIDIEvent.!Measure = 1
MIDIEvent.!Beat = 1
MIDIEvent.!Clock = 0
MIDIEvent.!Measure2 = 1
MIDIEvent.!Beat2 = 2
MIDIEvent.!Clock2 = 0
err = MIDISetEvent('TIME | DEL', 10)
IF err \== "" THEN SAY err