Dim LetterCount As Integer = 0 Dim strText As String strText = "" & OpenFD.ToString For Each c As Char In strText If c = "a to z" Then lettercount = lettercount + 1 End If Next TextBox1.Text = "" & LetterCount If OpenToolStripMenuItem.Checked = True Then TextBox1.Visible = True Else TextBox1.Visible = False End If End Sub