你用這個做參考
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
For i = 1 To 9
Print Space(18 - i * 2);
For j = 1 To i * 2 - 1
Print Str(i);
Next
Print
Next
End Sub
剛做出來的看看是不是你要的
Private Sub Command1_Click()
Dim strX As String
For i = 1 To 9
For j = 1 To i
strX = i & "*" & j & "=" & i * j
Form2.Print Tab((j - 1) * 8 + 3); strX;
Next j
Form2.Print
Next i
End Sub
Private Sub Form_Click()
Dim i As Integer, j As Integer, n As Integer
For n = 0 To 80
i = n \ 9
j = n Mod 9
If j <= i Then
Form1.CurrentX = j * 700
Form1.CurrentY = i * 200
Print j + 1 & "*" & i + 1 & "=" & (i + 1) * (j + 1)
End If
Next
End Sub
dim x as integer
dim y as integer
dim a as integer
Private Sub Form_Load()
For a = 0 To 80
x = n \ 9
y = n Mod 9
If y <= x Then
me.CurrentX = y * 900
me.CurrentY = x * 200
Print j + 1 & "*" & i + 1 & "=" & (i + 1) * (j + 1)
End If
Next
End Sub
從網上找到一個,可以用