application defined or object-defined error - pb sur ma macro

gustwo

XLDnaute Nouveau
Bonjour a tous,

J ai un gros soucis j ai un probleme sur ma macro, elle marche sur certains pc mais pas sur tous.

Pourriez vous m aider, avez vous deja eu ce genre de probleme ?

Private Sub CommandButton1_Click()

TBox1.SetFocus

Dim i As Integer
Dim L As Integer

'Clear the results page
Call ClearResults

'TextBox
Dim Digits As Double
Digits = TBox1.Value



Worksheets("Call reports").Select
Range("A2").Select


For i = 0 To 5300 Step 1
If ActiveCell.Offset(i, 0).Value = Digits Then
ActiveCell.Offset(i, 21).Value = 1
Else
ActiveCell.Offset(i, 21).Value = 0
End If
Next i

Worksheets("Call reports").Select
Range("A1").Select
For i = 1 To 5300: For L = 1 To 20
If ActiveCell.Offset(i, 21).Value = 1 Then Worksheets("Results").Cells(i + 1, L).Value = Cells(i + 1, L)Next: Next




'Empty the textbox
TBox1.Value = ""
'go to page results
Sheets("Results").Select

'Delete blank rows
Worksheets("Results").Select
Range("A1:A65536").SpecialCells(xlCellTypeBlanks).EntireRow.Delete



Me.Hide
End Sub

Le probleme arrive a cette ligne est depend du chiffre entré dans la textbox. (ne s arrete pas toujours au meme endoit : des fois i12, l20 pour le digit 530494 d autres fois a d autres endroits pour d autres digits.9

I need HELP please

MERCI D AVANCE
 

Discussions similaires

Statistiques des forums

Discussions
312 520
Messages
2 089 289
Membres
104 088
dernier inscrit
said4u