Nate Pet
Nate Pet

Reputation: 46322

VB.NET Else block

I have the following:

   ... Else row("Deg") = txtEditOtherDegree.Text

How do I do an Else block as I need to add more to the Else part

Upvotes: 0

Views: 116

Answers (2)

John Alexiou
John Alexiou

Reputation: 29274

I think you need multiple clauses like this:

If ... Then
    ' Statements
ElseIf ... Then
    ' More Statements
ElseIf ... Then
    ' Other Statements
Else
    ' Final Statements
End If

Upvotes: 1

Guffa
Guffa

Reputation: 700870

You put it on a separate line, and use End If:

If ... Then
  ...
Else
  row("Deg") = txtEditOtherDegree.Text
  ...
End If

Upvotes: 4

Related Questions