Mira, te pongo un ejemplo:
Me devuelve:
@Dessa
No pense que fuera a cambiar tanto el resultado...
Ahora pruebalo asi:
Mis resultados:
Dessa 2265
*PsYkE1* 1860
LeandroA 1984
DoEvents¡!
Código (vb) [Seleccionar]
Dim x As Long
Dim s As String
For x = 5000 To 5500
'If Check_Lucky_Number3(x) Then
If LuckyNumber(x) Then
s = s & x & " "
End If
Next
Debug.Print s
Me devuelve:
Citar5001 5005 5007 5011 5013 5019 5023 5025 5029 5031 5035 5041 5043 5047 5049 5053 5055 5061 5065 5067 5071 5073 5077 5083 5085 5089 5091 5095 5097 5103 5107 5109 5113 5115 5119 5125 5127 5131 5133 5137 5139 5145 5149 5151 5155 5157 5161 5167 5169 5173 5175 5179 5181 5187 5191 5193 5197 5199 5203 5209 5211 5215 5217 5221 5223 5229 5233 5235 5239 5241 5245 5251 5253 5257 5259 5263 5265 5271 5275 5277 5281 5283 5287 5293 5295 5299 5301 5305 5307 5313 5317 5319 5323 5325 5329 5335 5337 5341 5343 5347 5349 5355 5359 5361 5365 5367 5371 5377 5379 5383 5385 5389 5391 5397 5401 5403 5407 5409 5413 5419 5421 5425 5427 5431 5433 5439 5443 5445 5449 5451 5455 5461 5463 5467 5469 5473 5475 5481 5485 5487 5491 5493 5497Cuando deberia devolver:
Citar5001 5007 5019 5029 5041 5043 5049 5053 5089 5103 5127 5137 5139 5149 5151 5157 5169 5179 5181 5191 5211 5217 5229 5233 5235 5253 5259 5277 5283 5293 5295 5299 5325 5335 5341 5343 5371 5377 5379 5385 5409 5419 5427 5433 5449 5455 5463 5473 5487 5491
@Dessa
No pense que fuera a cambiar tanto el resultado...
Ahora pruebalo asi:
Código (vb) [Seleccionar]
Private Sub Form_Load()
Dim x As Long
Dim s As String
Dim t1 As Long
Dim t2 As Long
If App.LogMode = 0 Then End
Me.AutoRedraw = True
'Dessa
Me.Print "Dessa"
t1 = GetTickCount
For x = 5000 To 7000
If IsLucky(x) Then
s = s & x & " "
End If
Next
t2 = GetTickCount
Me.Print t2 - t1 & vbNewLine
MsgBox s
s = ""
'*PsYkE1*
Me.Print "PsYkE1"
t1 = GetTickCount
For x = 5000 To 7000
If Check_Lucky_Number3(x) Then
s = s & x & " "
End If
Next
t2 = GetTickCount
Me.Print t2 - t1 & vbNewLine
MsgBox s
'LeandroA
Me.Print "LeandroA"
t1 = GetTickCount
For x = 5000 To 7000
If IsLuckyNumber(x) Then
s = s & x & " "
End If
Next
t2 = GetTickCount
Me.Print t2 - t1
MsgBox s
End Sub
Mis resultados:
Dessa 2265
*PsYkE1* 1860
LeandroA 1984
DoEvents¡!