Discussione: OverFlow, perchè ?
Visualizza messaggio singolo
Vecchio 06-11-2017, 23.00.41   #4
ZeroKelvin
Newbie
 
Registrato: 12-05-2011
Messaggi: 3
ZeroKelvin promette bene
Rif: OverFlow, perchè ?

Ciao.
Forse la soluzione è molto più banale
Codice:
Sub AnalyzeData()
    Dim i As Integer
    Dim LastRow As Integer
    Dim avReturn As Double
    Dim stDev As Double
    Dim vrnc As Double

    LastRow = Sheets("Data").UsedRange.Row - 2 + Sheets("Data").UsedRange.Rows.Count
Sia i che LastRow sono dichiarate Integer ( valore compreso fra -32.768 e 32.767) ma, dal momento che sono destinate a contenere un valore di riga (le righe in un foglio sono 1048576) è molto probabile che siano queste variabili a provocare l'overflow.
Prova a dichiararle come Long.
ZeroKelvin non è collegato   Rispondi citando