?
Solved

Type Statement Question

Posted on 2002-07-26
3
Medium Priority
?
170 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
Suggested Courses
Course of the Month9 days, 3 hours left to enroll

764 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