Greetings, I have a UDT containing two string arrays and dimmed as an array itself. I am wondering if there is a quick way to clear the data from it without writing a nested loop?
Printable View
Greetings, I have a UDT containing two string arrays and dimmed as an array itself. I am wondering if there is a quick way to clear the data from it without writing a nested loop?
Declare another UDT (blank or uninitialized members) in addition to the working (where you do your processing) UDT... whenever you need to clear the working UDT, simply assign it blank UDT to it.
Hm, so you mean I do somthing like this:
Then, when I want to clear BankListViewID, I just do:Code:Public Type ControlFieldID
ControlValue(255) As String
FieldName(255) As String
End Type
Global BankListViewID(255) As ControlFieldID
Global Blank(255) As ControlFieldID
?Code:BankListViewID() = Blank()
I couldn't really figure out what you meant leinad :|
I've just used this instead:
Obviously, BankListViewID is used in the application and populated with data whereas BlankListViewID is dimmed but never populated.Code:Dim x As Integer
x = 0
Do While x <= 255
BankListViewID(x) = BlankListViewID(x)
x = x + 1
Loop
It depends on your notion of "reset" or what you are trying to accomplish.
Try ERASE BankListViewID in the meantime.
Works :)
Thankyou