Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Executable Error

Posted on 2009-04-01
Medium Priority
Last Modified: 2013-11-25
Hello, im re-writing a question because I went in wrong zone. Im started it as new here:

I did an application VB.NET with VS 2008. the app is running perfectly when I run my SQL and VS as administrator. Also, running perfeclty when I press the run button.

Now, when I try to execute via the EXE file inside the folder DEBUG, im having an error somewhere in the app that does not show up when I press the run button inside VS2008...

Also that EXE i did run as Administrator so I dont understand, whats the damn difference??

My Error is (see in code snippet)

and line 13 is :

        If getPanel("panelInner0").VerticalScroll.Visible = True Then

by the way, i tried to put in comment that IF and i had no more error.
but i still dont understand why the EXE dont like that if and inside VS2008 its fine... ?!?!

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at xx.frmCart.frmCart_Load(Object sender, EventArgs e) in C:\Users\Admin\Documents\Visual Studio 2008\Projects\xx\xx\frmCart.vb:line 13
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Open in new window

Question by:PhilippeRenaud
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
  • 3
  • 2
LVL 76

Expert Comment

ID: 24047768
Probably the flow of your program does not go as you expect it to so that you miss the code that defines the object.

If careful examination of the code does not reveal where that might be, you will have to resort to writing a log file to trace the program flow.

LVL 70

Expert Comment

by:Éric Moreau
ID: 24048055
maybe it is just a timing problem. have you tried to move that code into the Activate event when you are sure that the controls are fully loaded?

and again, Are you trying to run your application on the same or from another one? If it is another one, you are probably missing a component. If you are running from the same PC, an object was not set. Can you tell which object it is?

Author Comment

ID: 24049472
>> have you tried to move that code into the Activate event when you are sure that the controls are fully loaded?

what do you mean Activate Event .. ?

Yes its on the SAME PC.
I cant tell which object...
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

LVL 70

Accepted Solution

Éric Moreau earned 1500 total points
ID: 24049562
instead of setting your code into the Form_Load event, try to set it in the Form_Activated event.

Author Comment

ID: 24049618
oh ok Yes I will try that

Author Closing Comment

ID: 31565612

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…

721 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