以下是引用xiao2009xiao在2018-11-22 16:03:29的发言:
Private Sub Picture1_Click()
Dim se As String
pictrue1.Print Tab(35); "乘法表"
For i = 1 To 9
For j = 1 To 9
se = i & "✖" & j & "=" & i * j
pictrue1.Print Tab((j - 1) * 9); se;
Next j
pictrue1.Print
Next i
End Sub
在窗体上绘制一个图片控件,双击写完上面的程序后,还要做什么,才能正确运行?
你和程序应该是可以运行的,不能运行是因为你的picture1打错了,有几处打成了pict
rue1
二楼正确的乘法口决。
如果你一定得打印在PICTURE1里,下面的试试:
程序代码:
Private Sub picture1_Click()
Dim txt
Picture1.Print Tab(35); "乘法表"
For i = 1 To 9
For j = 1 To i
txt = txt & j & "X" & i & "=" & i * j & " "
Next
Picture1.Print txt
txt = ""
Next
End Sub