Private Sub CommandButton1_Click()
Dim myNumber As Long
Dim myStrg As String
TextBox2.Text = ""
myStrg = ""
myNumber = Len(TextBox1.Text) '文字数を数える
MsgBox "文字数は " & Len(TextBox1.Text) & " です。"
For i = 1 To myNumber '文字を「*」に置換する
TextBox2.Text = myStrg & "*"
myStrg = TextBox2.Text
Next i
End Sub
|