|
-
Sep 21st, 2007, 04:56 AM
#1
Thread Starter
Lively Member
[RESOLVED] Clearing all members of a UDT
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?
-
Sep 21st, 2007, 05:24 AM
#2
Re: Clearing all members of a UDT
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.
-
Sep 21st, 2007, 05:29 AM
#3
Thread Starter
Lively Member
Re: Clearing all members of a UDT
Hm, so you mean I do somthing like this:
Code:
Public Type ControlFieldID
ControlValue(255) As String
FieldName(255) As String
End Type
Global BankListViewID(255) As ControlFieldID
Global Blank(255) As ControlFieldID
Then, when I want to clear BankListViewID, I just do:
Code:
BankListViewID() = Blank()
?
-
Sep 21st, 2007, 05:50 AM
#4
Thread Starter
Lively Member
Re: Clearing all members of a UDT
I couldn't really figure out what you meant leinad :|
I've just used this instead:
Code:
Dim x As Integer
x = 0
Do While x <= 255
BankListViewID(x) = BlankListViewID(x)
x = x + 1
Loop
Obviously, BankListViewID is used in the application and populated with data whereas BlankListViewID is dimmed but never populated.
-
Sep 21st, 2007, 06:23 AM
#5
Re: Clearing all members of a UDT
It depends on your notion of "reset" or what you are trying to accomplish.
Try ERASE BankListViewID in the meantime.
Last edited by leinad31; Sep 23rd, 2007 at 07:23 PM.
-
Sep 21st, 2007, 06:29 AM
#6
Thread Starter
Lively Member
Re: Clearing all members of a UDT
Works 
Thankyou
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|