Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27349

VS 2010 [RESOLVED] Null Value for any string?

$
0
0
There is only one place I need to check for a NullException, however I have two questions:

1. Is there any way to Exit Sub whenever any string comes up with a NullException? For example, is it possible to start an IF statement at the beginning of the Sub saying if there is a NullException to end the Sub, and the End If at the end of the sub?

The main problem I'm having is that if the wrong code is output from the ListBox that the user manually input, then the webpage will not load the next page after automatically hitting NEXT on the browser, so when it tries to run the next function:

Code:

WebBrowser1.Document.GetElementById("promptInput_13").SetAttribute("value", stVO)
Then of course I get a NullException because the next page is not loaded and there is no "promptInput_13". This is the ONLY place I need to check for a NullException.

2. If the answer to question #1 is no, then how might I check for a NullException in the code I quoted?

Thanks for any replies ahead of time! You guys are quick and on top of it! I'm 99% done with this project and couldn't have done it without your help, so thank you!

Viewing all articles
Browse latest Browse all 27349

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>