i wanted to put a Exit for statment. how can i put it

Public Class Form3

Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim i As Integer
Dim Name As String

For i = 1 To 10
Name = InputBox("Enter the Name")


Exit For Name="Done"

Next


End Sub
End Class

what condition to exit?

Hi,
I think u have to exit for when input is equal to "done", If

Exit For Name="Done"

replace the above by

If Name.ToLower() = "done" Then
       Exit For
   End If
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.