Many Many thanks for all of you . jmsrickland i think your solution was shortest one !
Hack i manged to stop your first solution like this:Code:Private Sub Command1_Click() If Option7.Value = True Then 'for incrementing letters till z If Text5.Text = "z" Then Text5.Text = Chr(Asc("a") - 1) Text5.Text = Chr(Asc(Text5.Text) + 1) End If End sub
Code:Private Sub Command1_Click() Const ALPHA_BET As String = "abcdefghijklmnopqrstuvwxyz" Dim intLetter As Integer Dim intNum As Integer For i = 0 To Text1.Text = 27 Text1.Text = CStr(CLng(Text1.Text) + 1) If Text1.Text = 27 Then Text1.Text = 1 End If Next intNum = CInt(Text1.Text) For intLetter = 1 To Len(ALPHA_BET) If intLetter = intNum Then Text2.Text = LCase(Mid(ALPHA_BET, intLetter, 1)) Exit For End If Next End sub




Reply With Quote