Excel - Excel - Error 1004 en Vba Excel

 
Vista:

Excel - Error 1004 en Vba Excel

Publicado por Federicov (1 intervención) el 05/10/2015 20:27:21
Hola, como les va muchachos, tengo el error 1004 con este codigo (adjunto txt), a ver si alguien tiene idea que onda:

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
Sub insertExchanger()
    Dim iName As Integer
    Dim iUnitNumber As Integer
 
' Exchanger naming procedure
 
Range("userAddedExchangers").Offset(iSelection, 0).Value _
    = "=""E-"" & unitNumber + " & Val(iSelection)
 
    Range("userAddedExchangers").Offset(iSelection, 1).Value = strExchangerType
    Range("userAddedExchangers").Offset(iSelection, 5).Value = strExchangerMOC
 
    iTemp = roundAmount(convert(exchangerForm, "area", Val(exchangerForm.tbArea)) _
    * Range("preferenceArea"))
    Range("userAddedExchangers").Offset(iSelection, 6).Value = "=ROUND(" & _
    sArea & "*preferenceArea, " & iTemp & ")"
 
    If exchangerForm.tbPmaxShell.Enabled = True Then
        iTemp = roundAmount(sShellPressure * Range("preferencePressure"))
        Range("userAddedExchangers").Offset(iSelection, 2).Value = "=ROUND(" & _
        (sShellPressure) & "*preferencePressure, " & iTemp & ")"
    End If
 
    If exchangerForm.tbPmaxShell.Enabled = False Then
        Range("userAddedExchangers").Offset(iSelection, 2).Value = ""
    End If
 
    iTemp = roundAmount(sTubePressure * Range("preferencePressure"))
    Range("userAddedExchangers").Offset(iSelection, 3).Value = "=ROUND(" & _
        (sTubePressure) & "*preferencePressure, " & iTemp & ")"
 
    iTemp = roundAmount(lCp)
    Range("userAddedExchangers").Select
    ActiveCell.Offset(iSelection, 7).Value = "=ROUND(" & _
        (lCp / Range("CEPCI")) & "*CEPCI, " & iTemp & ")"
    ActiveCell.Offset(iSelection, 7).Style = "Currency"
    ActiveCell.Offset(iSelection, 7).NumberFormat = _
    "_($* #,##0_);_($* (#,##0);_($* ""-""??_);_(@_)"
 
    iTemp = roundAmount(lCBM)
    ActiveCell.Offset(iSelection, 8).Value = "=ROUND(" & _
        (lCBM / Range("CEPCI")) & "*CEPCI, " & iTemp & ")"
    ActiveCell.Offset(iSelection, 8).Style = "Currency"
    ActiveCell.Offset(iSelection, 8).NumberFormat = _
    "_($* #,##0_);_($* (#,##0);_($* ""-""??_);_(@_)"
End Sub


Desde ya muchas gracias. CUando pongo depurar me marca en amarillo la seccion esta:

1
2
ActiveCell.Offset(iSelection, 7).Value = "=ROUND(" & _
        (lCp / Range("CEPCI")) & "*CEPCI, " & iTemp & ")"
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

Excel - Error 1004 en Vba Excel

Publicado por pabdesan (1 intervención) el 11/11/2015 10:06:56
Ojalá te la resuelvan.. tengo exactamente el mismo problema. Supongo que estas usando el CAPCOST no? en mi caso he estado haciendo calculo con el durante 3 meses, y derrepente me empezo a dar ese error en cualquier pc que lo habra.. he probado de todo..
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