my professor want us to create a program in vb with factorial computation (which i already know the formula!).
my problem is when i input a bigger number there's an "error runtime-6 overflow". how can i fix these? TY in advance.
here's my code so far.
Public t Dim i As Currency Dim z As Integer Dim m As Integer Dim fact As Integer Private Sub Command1_Click() t = 10 fact = 1 For i = 1 To Text3 Step 1 List1.AddItem i fact = fact * i Text2 = fact Next List1.AddItem i End Sub Private Sub Form_Load() Timer1.Enabled = True t = 10 End Sub Private Sub Text1_Change() Text1.Enabled = True End Sub Private Sub Timer1_Timer() Countdown.Text = t If t = 0 Then Text3.Enabled = False Timer1.Enabled = False End If t = t - 1 End Sub