Excel - problemas con codigo, error 6 desbordamiento

 
Vista:

problemas con codigo, error 6 desbordamiento

Publicado por cristian (2 intervenciones) el 11/02/2015 14:37:05
HOLA BUENAS, ME PUEDEN AYUDAR CON ESTE CODIGO DE BUSQUEDA POR FAVOR
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
Private Sub CommandButton6_Click()
Dim cod_name, codbus As String
Dim posicion As Integer
posicion = 2
 
cod_name = codte
Do While codbus <> cod_name
    posicion = posicion + 1
    Hoja6.Select
    codbus = Range("A" & posicion).Value
    If cod_name = Empty Then
    Exit Do
    MsgBox "Debe ingresar un código en sistema"
 
    codte.SetFocus
 
End If
 
Loop
Dim tipo As String
 
tipote = Range("D" & posicion).Value
descte = Range("e" & posicion).Value
pnte = Range("h" & posicion).Value
Espesorte = Range("F" & posicion).Value
dnte = Range("F" & posicion).Value
ate = Range("o" & posicion).Value
bte = Range("p" & posicion).Value
zte = Range("q" & posicion).Value
ltte = Range("r" & posicion).Value
End Sub
 
 
 
use long  pero me sale un error global, si me pueden ayudar por favor
 
Private Sub CommandButton6_Click()
Dim cod_name, codbus As String
Dim posicion As long
posicion = 2
 
cod_name = codte
Do While codbus <> cod_name
    posicion = posicion + 1
    Hoja6.Select
    codbus = Range("A" & posicion).Value
    If cod_name = Empty Then
    Exit Do
    MsgBox "Debe ingresar un código en sistema"
 
    codte.SetFocus
 
End If
 
Loop
Dim tipo As String
 
tipote = Range("D" & posicion).Value
descte = Range("e" & posicion).Value
pnte = Range("h" & posicion).Value
Espesorte = Range("F" & posicion).Value
dnte = Range("F" & posicion).Value
ate = Range("o" & posicion).Value
bte = Range("p" & posicion).Value
zte = Range("q" & posicion).Value
ltte = Range("r" & posicion).Value
End Sub
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

problemas con codigo, error 6 desbordamiento

Publicado por cristian (2 intervenciones) el 11/02/2015 15:23:37
Solucionado :D
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar