VB.NET System.ExecutionEngineException

  • Thread starter Trivender Singh
  • Start date
T

Trivender Singh

I am trying to run the following piece of code.

Dim objCommandBars As CommandBars
Dim objStandardBar As CommandBar
Dim WithEvents mobjExplorer As Outlook.ExplorerClass

mobjExplorer = CType(mobjOutLookApp.ActiveExplorer,
Outlook.ExplorerClass)

objCommandBars = mobjExplorer.CommandBars

objStandardBar = objCommandBars.Item(8) <-- this statement generates
an exception of the type - System.ExecutionEngineException which I am
not even able to catch.

But when I try to run the same statement in the immediate window it
executes without any problem.

Has anybody experienced a similar problem before in VB.NET

regards
Trivender Singh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top