Solved

VB and localerror

Posted on 2000-03-07
8
171 Views
Last Modified: 2010-05-02
Hello,

Has anybody ever heard of localerror
in VB, by the way it is not a user created error label.

Thank you for your time!

rai
0
Comment
Question by:rai_t
  • 2
  • 2
  • 2
  • +1
8 Comments
 
LVL 43

Expert Comment

by:TimCottee
ID: 2591153
The only mention of it in MSDN is:

Private Function AnyFunction() As Integer

On Error GoTo LocalError
' Normal procedure code goes here.

Exit Function
LocalError:
If Fatal("Module.AnyFunction") = vbRetry Then
    Resume
Else
    Resume Next
End If

End Function

But that is a local defined error label.
0
 
LVL 10

Expert Comment

by:caraf_g
ID: 2591169
On Local Error Goto....

Never noticed any difference between this and the On Error construct.
0
 
LVL 10

Expert Comment

by:caraf_g
ID: 2591173
Perhaps it's something that's in VB for backward compatibility but ceased to have a noticeable effect. Like showing a message box system modal. The system modal option is still there, but it doesn't actually work anymore in Win32.
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 14

Accepted Solution

by:
mcrider earned 80 total points
ID: 2591217
"On Local Error" goes back to VB1-VB3.

Back then, you couldn't use the On Error Goto and On Event Gosub statements in a form because they require an event handler at the module level, and you couldn't enter code at the module level of a form... Line labels and line numbers were allowed in the module level of a form module, but they are useless.


See the following Microsoft KB articles:

Error: Executable code not allowed in module level of a form
http://support.microsoft.com/support/kb/articles/Q94/6/95.ASP?LNG=ENG&SA=MSDN&FR=0 

INFO: Error Codes & Descriptions for Visual Basic for MS-DOS 1.0
http://support.microsoft.com/support/kb/articles/Q99/7/20.ASP?LNG=ENG&SA=MSDN&FR=0 
 


Cheers!®©




0
 
LVL 14

Expert Comment

by:mcrider
ID: 2591646
Thanks for the points! Glad I could help!


Cheers!
0
 

Expert Comment

by:t_msenthilk
ID: 9901435
Error: Executable code not allowed in module level of a form
http://support.microsoft.com/support/kb/articles/Q94/6/95.ASP?LNG=ENG&SA=MSDN&FR=0 

INFO: Error Codes & Descriptions for Visual Basic for MS-DOS 1.0
http://support.microsoft.com/support/kb/articles/Q99/7/20.ASP?LNG=ENG&SA=MSDN&FR=0 

These two link page are not there in microsoft site..........!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

When clicked it just redirecting to the page not found ASP page.
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 9903812
http://support.microsoft.com/default.aspx?scid=kb;en-us;94695
And
http://support.microsoft.com/default.aspx?scid=kb;en-us;99720

Instead. Microsoft has changed the way that their links work and these are the new style.
0
 

Expert Comment

by:t_msenthilk
ID: 9908999
hi TimCottee,
             Thank u. I think Microsoft had shifted many thing from ASP to ASP.NET.
             Now both the links works.

 
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
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…

770 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