Solved

Problems with user defined types (VB3)

Posted on 1997-04-10
5
191 Views
Last Modified: 2008-03-06
I have a big problem with the VB3 editor, concerning type declarations!!! If I start a program while debugging code, the following mysterious thing happens:
After editing a line with an user-defined-type and continuing the program, VB3 does not accept the user-defined type (udt) anymore (error message:"Identifier is not an object or user-defined-type"). When the program is stopped and you want to start the program again, the same error message comes up.
Finally, if you redefines the variable, a simply space in the line of ("Global gtVar as tType"), and starting the program again, everything works without problems until you edit a line with this udt.

Some additional informations:
This bug has not appeared from the beginning in the program. Not every global udt has this bug. The size of the udt is not responsible for the bug. Small types and big types have the same problem.

To restart VB can´t be the solution!!!
0
Comment
Question by:farenet
5 Comments
 

Expert Comment

by:Msoft
ID: 1425193
Hi,
I think that all UDT must be global and declared In Module.
Maybe you declared variable and UTD at same name or same name to VB Global Constants.



0
 

Expert Comment

by:coq
ID: 1425194
Do you have decleared it public?

/johan

0
 
LVL 1

Expert Comment

by:bhoward
ID: 1425195
I have seen this behavior with VB3 on several occaisions.  I write it off to the general flakiness of the product, save my files, exit VB, and reload VB.  In fact, this is my response to any number of flaky behaviors VB3 has.
0
 

Author Comment

by:farenet
ID: 1425196
Edited text of question
0
 
LVL 3

Accepted Solution

by:
mheacock earned 100 total points
ID: 1425197
Restart VB.  It is simply a bug in VB 3.  There is probably
a specific way to always recreate the error within any
program using UDTs, but so far I haven't figured it out.
Just something weird in VB3 that you'll have to live with.

Save, restart.  It's the only way.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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 process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

863 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

29 Experts available now in Live!

Get 1:1 Help Now