Code: Select all
Private Sub APRI_TAB()
Dim I As Long
Me.LAZIONI.Caption = "EXPORT DATI...!"
DoEvents
Set RSA = New ADODB.Recordset
RSA.CursorLocation = adUseClient
RSA.Open SQL, CNN, adOpenForwardOnly, adLockReadOnly
NR = RSA.RecordCount
Erase strDBRows()
strDBRows = RSA.GetRows()
RSA.Close
Set RSA = Nothing
R = 1
For I = 0 To UBound(strDBRows, 2)
Me.LPERCENT.Caption = NR / R * 100 & "%"
DoEvents
R = R + 1
Next I
Me.LAZIONI.Caption = "FINE EXPORT DATI!"
DoEvents
Sleep (1000)
Me.LAZIONI.Caption = ""
DoEvents
End Sub
In label i see a big number with 9 decimal !!!!
R and NR as Long dimensioned