?
Solved

Type Statement Question

Posted on 2002-07-26
3
Medium Priority
?
177 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 100 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 Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month17 days, 10 hours left to enroll

830 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