Try the following code. I have changed your if then to a select statement. When the "*" gets to 4, it counts back 1 at a time by removing the last "*" -
Option Explicit
Private Sub Command1_Click()
Dim x As Integer, z As Integer
Dim y As String, Wave As String
x = 5
z = 3
y = "*"
Wave = cboWave.Text
Select Case Wave
Case 1
Do
Print y
x = x - 1
y = y + "*"
Loop Until x = 2
Do
Print y
If y = vbNullString Then
Exit Sub
Else
y = Left$(y, Len(y) - 1)
End If
Loop Until x = 0
End Select
End Sub
Just play around if user selects 2, 3, 4 etc from combobox.
AndreRet
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20
Only a pleasure. If this solved your problem, please mark it as solved, thanks.
AndreRet
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20