Sub Main
Dim T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14
Dim A1,A2,A3,A4,A5,A6,A7,A8,A9
Dim B1,B2,B3,B4,B5,B6,B7,B8,B9
Dim ES,Nx,Tx,LARGHEZZE,S,S1,S2,S3,S4
Dim N1,N2,N3,N4,N5,N6,N7,N8,N9,N10,N11,N12,N13,N14,N15
Nx = InputBox("Inserire numero",,0)
A1 = Nx
'For A1 = 2 To 90
'------------------------------------------------
T1 = Array(T1," "," "," ")
Call InitTabella(T1,Bianco_,"center",3,Nero_,"raavi")
'
'------------------------------------------------
T2 = Array(T2," NUMERO " & Nx," ÷ "," ")
LARGHEZZE = Array(T2,6,6,6)
Call AddRigaTabella(T2,Bianco_,"center",LARGHEZZE,Nero_,"raavi")
Call SetColoreCella(1,RGB(22,226,226),RGB(15,15,15))
Call SetColoreCella(2,RGB(240,251,38),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
'
'--------------------------------------
'
If Int(A1/13) =(A1/13) Then S1 = "13" _
Else
If Int(A1/11) =(A1/11) Then S1 = "11" _
Else
If Int(A1/7) =(A1/7) Then S1 = "7" _
Else
If Int(A1/5) =(A1/5) Then S1 = "5" _
Else
If Int(A1/3) =(A1/3) Then S1 = "3" _
Else
If Int(A1/2) =(A1/2) Then S1 = "2"
T3 = Array(T3,A1,"÷",S1)
LARGHEZZE = Array(T3,6,6,6)
Call AddRigaTabella(T3,Bianco_,"center",LARGHEZZE,Nero_,"raavi")
'
'--------------------------------------------
'
If Int(A1/13) =(A1/13) Then B1 =(A1/13) : S1 = "13" _
Else
If Int(A1/11) =(A1/11) Then B1 =(A1/11) : S1 = "11" _
Else
If Int(A1/7) =(A1/7) Then B1 =(A1/7) : S1 = "7" _
Else
If Int(A1/5) =(A1/5) Then B1 =(A1/5) : S1 = "5" _
Else
If Int(A1/3) =(A1/3) Then B1 =(A1/3) : S1 = "3" _
Else
If Int(A1/2) =(A1/2) Then B1 =(A1/2) : S1 = "2"
T4 = Array(T4,B1,"÷",S1)
LARGHEZZE = Array(T4,6,6,6)
Call AddRigaTabella(T4,Bianco_,"center",LARGHEZZE,Nero_,"raavi")
'
'--------------------------------------------
'
If Int(B1/13) =(B1/13) Then B2 =(B1/13) : S1 = "13" _
Else
If Int(B1/11) =(B1/11) Then B2 =(B1/11) : S1 = "11" _
Else
If Int(B1/7) =(B1/7) Then B2 =(B1/7) : S1 = "7" _
Else
If Int(B1/5) =(B1/5) Then B2 =(B1/5) : S1 = "5" _
Else
If Int(B1/3) =(B1/3) Then B2 =(B1/3) : S1 = "3" _
Else
If Int(B1/2) =(B1/2) Then B2 =(B1/2) : S1 = "2"
T5 = Array(T5,B2,"÷",S1)
LARGHEZZE = Array(T5,6,6,6)
Call AddRigaTabella(T5,Bianco_,"center",LARGHEZZE,Nero_,"raavi")
'
'------------------------------------------
'
If Int(B2/13) =(B2/13) Then B3 =(B2/13) : S1 = "13" _
Else
If Int(B2/11) =(B2/11) Then B3 =(B2/11) : S1 = "11" _
Else
If Int(B2/7) =(B2/7) Then B3 =(B2/7) : S1 = "7" _
Else
If Int(B2/5) =(B2/5) Then B3 =(B2/5) : S1 = "5" _
Else
If Int(B2/3) =(B2/3) Then B3 =(B2/3) : S1 = "3" _
Else
If Int(B2/2) =(B2/2) Then B3 =(B2/2) : S1 = "2"
T6 = Array(T6,B3,"÷",S1)
LARGHEZZE = Array(T6,6,6,6)
Call AddRigaTabella(T6,Bianco_,"center",LARGHEZZE,Nero_,"raavi")
Call SetColoreCella(2,RGB(22,226,226),RGB(0,0,0))
'
'-------------------------------------------------------
'
If Int(B3/13) =(B3/13) Then B4 =(B3/13) : S1 = "13" _
Else
If Int(B3/11) =(B3/11) Then B4 =(B3/11) : S1 = "11" _
Else
If Int(B3/7) =(B3/7) Then B4 =(B3/7) : S1 = "7" _
Else
If Int(B3/5) =(B3/5) Then B4 =(B3/5) : S1 = "5" _
Else
If Int(B3/3) =(B3/3) Then B4 =(B3/3) : S1 = "3" _
Else
If Int(B3/2) =(B3/2) Then B4 =(B3/2) : S1 = "2"
T7 = Array(T7,B4,"÷",S1)
LARGHEZZE = Array(T7,6,6,6)
Call AddRigaTabella(T7,Bianco_,"center",LARGHEZZE,Nero_,"raavi")
'
If Int(B2/13) =(B2/13) Then B3 =(B2/13) : S1 = "13" _
Else
If Int(B2/11) =(B2/11) Then B3 =(B2/11) : S1 = "11" _
Else
If Int(B2/7) =(B2/7) Then B3 =(B2/7) : S1 = "7" _
Else
If Int(B2/5) =(B2/5) Then B3 =(B2/5) : S1 = "5" _
Else
If Int(B2/3) =(B2/3) Then B3 =(B2/3) : S1 = "3" _
Else
If Int(B2/2) =(B2/2) Then B3 =(B2/2) : S1 = "2"
T8 = Array(T8,B6,"÷",S1)
LARGHEZZE = Array(T8,6,6,6)
Call AddRigaTabella(T8,Bianco_,"center",LARGHEZZE,Nero_,"raavi")
'
If Int(B2/13) =(B2/13) Then B3 =(B2/13) : S1 = "13" _
Else
If Int(B2/11) =(B2/11) Then B3 =(B2/11) : S1 = "11" _
Else
If Int(B2/7) =(B2/7) Then B3 =(B2/7) : S1 = "7" _
Else
If Int(B2/5) =(B2/5) Then B3 =(B2/5) : S1 = "5" _
Else
If Int(B2/3) =(B2/3) Then B3 =(B2/3) : S1 = "3" _
Else
If Int(B2/2) =(B2/2) Then B3 =(B2/2) : S1 = "2"
T9 = Array(T9,B7,"÷",S1)
LARGHEZZE = Array(T9,6,6,6)
Call AddRigaTabella(T9,Bianco_,"center",LARGHEZZE,Nero_,"raavi")
'
If Int(B2/13) =(B2/13) Then B3 =(B2/13) : S1 = "13" _
Else
If Int(B2/11) =(B2/11) Then B3 =(B2/11) : S1 = "11" _
Else
If Int(B2/7) =(B2/7) Then B3 =(B2/7) : S1 = "7" _
Else
If Int(B2/5) =(B2/5) Then B3 =(B2/5) : S1 = "5" _
Else
If Int(B2/3) =(B2/3) Then B3 =(B2/3) : S1 = "3" _
Else
If Int(B2/2) =(B2/2) Then B3 =(B2/2) : S1 = "2"
T10 = Array(T10,B8,"÷",S1)
LARGHEZZE = Array(T10,6,6,6)
Call AddRigaTabella(T10,Bianco_,"center",LARGHEZZE,Nero_,"raavi")
Call SetColoreCella(2,RGB(255,0,255),RGB(0,0,0))
'
Call SetTableWidth("25%")
CreaTabella
'Next
End Sub