Solved

Type Statement Question

Posted on 2002-07-26
3
163 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

746 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now