0

Hi Guys. First let me say that this site is fantastic and the knowledge spread is vast.

OK, now I'm somewhat of a noob when it comes to VB.net 2008 and have not long been coding with it. I came across a problem with the cancel button on an "input box". When the user clicks it, the program crashes. Is there any coding that I can use to stop this happening?

Many thanks and keep up the great work.

Red

2
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by __avd
0

Welcome Redserpent.

InputBox function returns zero length string if cancel button is clicked.

Test this code:

Dim m As String = InputBox("enter name : ")
 MsgBox(m.Length)
0

Hi Adatapost, thanks for the speedy reply. I will give your idea a shot.

Many thanks

Red

0

Hi Adatapost, thanks for the speedy reply. I will give your idea a shot.

Many thanks

Red

Thanks. Please mark this thread as Solved.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.