Program Exiting Procedure Before Completing Instructions

Posted on 2009-05-28
Medium Priority
Last Modified: 2012-05-07
When I step thruought the code, the vb stepper lands right on instruction "frmForm.Add(f)" below.  When I press F8 again instead of it being executed and flowing down to the next instruction, it just exists out of the procedure.  I tried placing On error goto 0 before it and it did not help.  When I try to reference  frmForm(TabNumber) later in the program, it comes up empty.  Any suggestions?

Dims:   Public frmForm As List(Of PDF_ML_Form)
           Dim f As New PDF_ML_Form
           f.TabID = TabPages.Count
Other instructions
Question by:GarySB
LVL 86

Accepted Solution

Mike Tomlinson earned 1000 total points
ID: 24494833
Did you INSTANTIATE your "frmForm" List?

You have:

    Public frmForm As List(Of PDF_ML_Form)

You need to use the "New" keyword:

    Public frmForm As New List(Of PDF_ML_Form)

Or have you already done this via code somewhere else?
LVL 61

Expert Comment

ID: 24494847
do you get any exception? or do you have any exception handler that calls your procedure?

maybe your code & compiled versions are different, try to clean up your project and rebuild before debugging...

Author Closing Comment

ID: 31586299
Thank You Idle_Mind The New keyword solved it.
I posed another question similar to this. Title 'How to update a List(Of...
I'm trying to simply update the entire frmForm() with the latest displayed data.  I'm using
BOMaterial.frmForm(TabPage) = BOMaterial.BOM_TabControl1.TabPages(TabPage).Container But it seems to save a single item (blank) instead of the entire form.  Is it possible for you to switch over to the other question?

Featured Post

Train for your Pen Testing Engineer Certification

Enroll today in this bundle of courses to gain experience in the logistics of pen testing, Linux fundamentals, vulnerability assessments, detecting live systems, and more! This series, valued at $3,000, is free for Premium members, Team Accounts, and Qualified Experts.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
An ASP.NET Web Form User Control is not newly introduced in ASP.NET. In fact, it was an old technology yet still playing a role to generate web content, especially when we want to use it to have a better and easy way to control part of the web conte…
The video provides a quick and easy steps to migrate MBOX file to well known Outlook PST and Office 365. Besides this, it also supports and migrates more than 20 email clients of MBOX which include AppleMail, Opera, Thunderbird and SeaMonkey effortl…
In the video, one can understand the process of resizing images in single or bulk. Kernel Bulk Image Resizer is an easy to use tool for resizing large number of images. One can add and resize multiple images with this tool in single go. The video sh…

624 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