Solved

Type Statement Question

Posted on 2002-07-26
3
165 Views
Last Modified: 2010-05-02
Hello Experts:

Is there a way to (re)initialize a type statement so all of the elements of that type statement are reset.  For Instance:

Private Type TestType
 a as string
 b as integer
 c as double
End Type

Dim X as TestType

I'd like to be able to issue a command to initialize a,b and c.

Is this possible or does each element need to be initialized?

VB 6.0
0
Comment
Question by:escheider
  • 2
3 Comments
 
LVL 16

Accepted Solution

by:
Richie_Simonetti earned 25 total points
ID: 7180703
If i understood what you need:
You don't have to initialize each, just only what you need. Take in mind that if you not initialize every memebre, it will takes default valus for each type (o to integer/long..., empty string for strings, false for boolean and so on)

Now, if you want to clear all initialized valñues for a given variable of type TestType, just declare another one:

dim other as TestType
set X = other
0
 
LVL 4

Author Comment

by:escheider
ID: 7180712
Answers my question.....
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7180785
thanks for "A" grade. Sorry for my typing errors :)
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question