Sub multiplication() Dim ligne As String, nb, j, i As Integer nb = InputBox("enter the number") ligne = "" For i = 0 To 10 For j = 1 To nb ligne = ligne & i & "x" & j & "=" & i * j & vbTab Next j ligne = ligne & vbCrLf Next i MsgBox prompt:=ligne, title:="result" End Sub