Solved

Problems with user defined types (VB3)

Posted on 1997-04-10
5
186 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

743 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

12 Experts available now in Live!

Get 1:1 Help Now