---
title: "Make ElseIf Statement Check Strings"  
description: "Make ElseIf Statement Check Strings"  
author: "Anonymous User"  
published: 2013-06-11  
updated: 2013-06-12  
canonical: https://www.mindstick.com/forum/1034/make-elseif-statement-check-strings  
category: "vb.net"  
tags: ["vb.net"]  
reading_time: 1 minute  

---

# Make ElseIf Statement Check Strings

Hi,\
How to [check](https://yourviews.mindstick.com/story/2248/never-forget-to-check-these-specifications-before-buying-a-mobile-phone) **[textbox](https://www.mindstick.com/forum/12714/dynamic-textbox-in-gridview)** [equals](https://www.mindstick.com/interview/33895/difference-between-and-equals-method-in-c-sharp) to the [string](https://www.mindstick.com/articles/1527/string-split-in-c-sharp) in **My.Settings.Something** in [VB.NET](https://www.mindstick.com/forum/426/sqlsever-2000-in-network-with-vb-dot-net-2008)?\
Thanks in advance. \
\

## Replies

### Reply by AVADHESH PATEL

Hi Samuel,\
You can used If Else statement for checking Strings\

```
    If My.Settings.Something <> TextboxName.Text Then         // to do if...    ElseIf My.Settings.Something = TextboxName.Text Then         // to do else if...    ElseIf My.Settings.Something = 999 Then         // to do else if...    Else        // to do else...     End If
```

**\**Depending on variable types you using in the settings you might need to use **My.Settings.Something.ToString()** instead of My.Settings.Something Additionally, it might be needed to first store the variable from the textbox into a variable of the right type.\

```
   Dim dblVar as Double   dblVar = TextBoxName.Text
```


---

Original Source: https://www.mindstick.com/forum/1034/make-elseif-statement-check-strings

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
