ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   deleting array element (https://www.excelbanter.com/excel-programming/285811-deleting-array-element.html)

michael

deleting array element
 
I am kind of new to the programming world and am trying to
create a loop that will check certain fields of a user
defined data type and delete it if it meets certain
criteria. My user-defined data type looks like this;

Type SwitchingTimes
DayofWeek As String * 3
TimeSwitch As Date
Phase As String * 1
SwitchON As String * 3
feeder As Long
kVARs As Long
End Type
Dim Switching() As SwitchingTimes

I would like to delete all elements at a time... for
example if at i=3 the criteria are met, I would like to
delete Switching(3).DayofWeek, Switching(3).TimeSwitch,
Switching(3).Phase, etc for all. I tried the code Set
Switching(i)= nothing but that gives an error... thanks
in advance for the help


All times are GMT +1. The time now is 08:29 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com