*为了避免因Text1和Text2输入不符合要求的数据而导致代码运行出错,请先手动将这两个文本框的“有效性规则”属性设置为 >=1 And <=9
编写下列按钮单击事件过程即可实现
Private Sub Command1_Click()
Dim n As Integer, a As Integer
Dim i As Integer, strg As String
If IsNull(Text1) Then
MsgBox "请输入n"
Text1.SetFocus
Exit Sub
ElseIf IsNull(Text2) Then
MsgBox "请输入a
Text2.SetFocus
Exit Sub
End If
n=Text1
a=Text2
For i=1 To n
strg=strg & a
Next i
Text3=strg
End Sub
好呢。。可提纲提供