Erreur d'execution '1004'

Erreur d'execution '1004' - VB/VBA/VBS - Programmation

Marsh Posté le 02-06-2010 à 09:17:21    

Bonjour voilà j'ai un pb à cette ligne là, pouvez-vous m'aider svp??
 
Sub macro_Indice_croise()
 
Sheets("Import_Data" ).Select
Application.ExecuteExcel4Macro "FctUpdateAuto()"
 
 
Range("c9:d2000" ).Select
Selection.Copy
Sheets("Indice_croise" ).Select
Range("A12" ).Select
Selection.PasteSpecial Paste:=xlPasteValues
 
 
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 2).FormulaR1C1 = "=FDSB(RC[-2],""EC_ATTR_SEDOL_CODE(""""TSSET=PPRICE"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 3).FormulaR1C1 = "=FDSB(RC[-3],""FS_ISIN"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 4).FormulaR1C1 = "=FDSB(RC[-4],""GICS_SECTOR"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 5).FormulaR1C1 = "=FDSB(RC[-5],""GICS_INDGRP"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 6).FormulaR1C1 = "=FDSB(RC[-6],""GICS_IND"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 7).FormulaR1C1 = "=FDSB(RC[-7],""EC_MKT_CAP(D,""""CUR=EUR"""" )"" )"
 
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 8).FormulaR1C1 = "=FDSB(RC[-8],""EC_PRICE(1,,D,""""TSSET=PPRICE,CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 9).FormulaR1C1 = "=FDSB(RC[-9],""EC_PRICE_CHG(1,,D,""""7D,CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 10).FormulaR1C1 = "=FDSB(RC[-10],""EC_PRICE_CHG(1,,D,""""1M,CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 11).FormulaR1C1 = "=FDSB(RC[-11],""EC_PRICE_CHG(1,,D,""""YTD,CUR=EUR"""" )"" )"
 
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 12).FormulaR1C1 = "=FDSB(RC[-12],""EC_MED_EV_SALES(2010,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 13).FormulaR1C1 = "=FDSB(RC[-13],""EC_MED_EV_SALES(2011,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 14).FormulaR1C1 = "=FDSB(RC[-14],""EC_MED_EV_SALES(2012,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 15).FormulaR1C1 = "=FDSB(RC[-15],""EC_MED_EV_SALES(2013,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 16).FormulaR1C1 = "=FDSB(RC[-16],""EC_MED_EV_EBIT(2010,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 17).FormulaR1C1 = "=FDSB(RC[-17],""EC_MED_EV_EBIT(2011,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 18).FormulaR1C1 = "=FDSB(RC[-18],""EC_MED_EV_EBIT(2012,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 19).FormulaR1C1 = "=FDSB(RC[-19],""EC_MED_EV_EBIT(2013,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 20).FormulaR1C1 = "=FDSB(RC[-20],""EC_MED_EV_EBITDA(2010,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 21).FormulaR1C1 = "=FDSB(RC[-21],""EC_MED_EV_EBITDA(2011,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 22).FormulaR1C1 = "=FDSB(RC[-22],""EC_MED_EV_EBITDA(2012,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 23).FormulaR1C1 = "=FDSB(RC[-23],""EC_MED_EV_EBITDA(2013,,D,""""CUR=EUR"""" )"" )"
 
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 24).FormulaR1C1 = "=FDSB(RC[-24],""EC_MED_PBPS(2010,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 25).FormulaR1C1 = "=FDSB(RC[-25],""EC_MED_PBPS(2011,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 26).FormulaR1C1 = "=FDSB(RC[-26],""EC_MED_PBPS(2012,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 27).FormulaR1C1 = "=FDSB(RC[-27],""EC_MED_PBPS(2013,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 28).FormulaR1C1 = "=FDSB(RC[-28],""EC_MED_PCF(2010,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 29).FormulaR1C1 = "=FDSB(RC[-29],""EC_MED_PCF(2011,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 30).FormulaR1C1 = "=FDSB(RC[-30],""EC_MED_PCF(2012,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 31).FormulaR1C1 = "=FDSB(RC[-31],""EC_MED_PCF(2013,,D,""""CUR=EUR"""" )"" )"
 
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 32).FormulaR1C1 = "=FDSB(RC[-32],""ECA_MED_EPS(2010,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 33).FormulaR1C1 = "=FDSB(RC[-33],""ECA_MED_EPS(2011,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 34).FormulaR1C1 = "=FDSB(RC[-34],""ECA_MED_EPS(2012,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 35).FormulaR1C1 = "=FDSB(RC[-35],""ECA_MED_EPS(2013,,D,""""CUR=EUR"""" )"" )"
 
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 36).FormulaR1C1 = "=FDSB(RC[-36],""EC_MED_ROE(2010,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 37).FormulaR1C1 = "=FDSB(RC[-37],""EC_MED_ROE(2011,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 38).FormulaR1C1 = "=FDSB(RC[-38],""EC_MED_ROE(2012,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 39).FormulaR1C1 = "=FDSB(RC[-39],""EC_MED_ROE(2013,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 40).FormulaR1C1 = "=FDSB(RC[-40],""ECA_MED_EBIT(2010,,D,""""CUR=EUR"""" )/(EC_MKT_CAP(2010,,D,""""CUR=EUR"""" )+ ECA_MED_NDT(2010,,D,""""CUR=EUR"""" ))"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 41).FormulaR1C1 = "=FDSB(RC[-41],""ECA_MED_EBIT(2011,,D,""""CUR=EUR"""" )/(EC_MKT_CAP(2011,,D,""""CUR=EUR"""" )+ ECA_MED_NDT(2011,,D,""""CUR=EUR"""" ))"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 42).FormulaR1C1 = "=FDSB(RC[-42],""ECA_MED_EBIT(2012,,D,""""CUR=EUR"""" )/(EC_MKT_CAP(2012,,D,""""CUR=EUR"""" )+ ECA_MED_NDT(2012,,D,""""CUR=EUR"""" ))"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 43).FormulaR1C1 = "=FDSB(RC[-43],""ECA_MED_EBIT(2013,,D,""""CUR=EUR"""" )/(EC_MKT_CAP(2013,,D,""""CUR=EUR"""" )+ ECA_MED_NDT(2013,,D,""""CUR=EUR"""" ))"" )"
 
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 44).FormulaR1C1 = "=FDSB(RC[-44],""ECA_MED_NDT(2010,,D,""""CUR=EUR"""" ) / ECA_MED_SH_EQUITY(2010,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 45).FormulaR1C1 = "=FDSB(RC[-45],""ECA_MED_NDT(2011,,D,""""CUR=EUR"""" ) / ECA_MED_SH_EQUITY(2011,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 46).FormulaR1C1 = "=FDSB(RC[-46],""ECA_MED_NDT(2012,,D,""""CUR=EUR"""" ) / ECA_MED_SH_EQUITY(2012,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 47).FormulaR1C1 = "=FDSB(RC[-47],""ECA_MED_NDT(2013,,D,""""CUR=EUR"""" ) / ECA_MED_SH_EQUITY(2013,,D,""""CUR=EUR"""" )"" )"
 
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 48).FormulaR1C1 = "=FDSB(RC[-48],""ECA_MED_NDT(2010,,D,""""CUR=EUR"""" ) / ECA_MED_EBITDA(2010,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 49).FormulaR1C1 = "=FDSB(RC[-49],""ECA_MED_NDT(2011,,D,""""CUR=EUR"""" ) / ECA_MED_EBITDA(2011,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 50).FormulaR1C1 = "=FDSB(RC[-50],""ECA_MED_NDT(2012,,D,""""CUR=EUR"""" ) / ECA_MED_EBITDA(2012,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 51).FormulaR1C1 = "=FDSB(RC[-51],""ECA_MED_NDT(2013,,D,""""CUR=EUR"""" ) / ECA_MED_EBITDA(2013,,D,""""CUR=EUR"""" )"" )"
 
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 52).FormulaR1C1 = "=FDSB(RC[-52],""FE_ESTIMATE_DATE('LAST_DATE','EPSBG','ANNUAL','+1','MM/DD/YYYY',0,,,'')"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 53).FormulaR1C1 = "=FDSB(RC[-53],""EC_MEAN_EPS_NTMA(2010,,D,""""CUR=EUR"""" )/ EC_MEAN_EPS_NTMA(2010+0/-30/0,,D,""""CUR=EUR"""" )-1"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 54).FormulaR1C1 = "=FDSB(RC[-54],""EC_MEAN_EPS_NTMA(2010,,D,""""CUR=EUR"""" )/ EC_MEAN_EPS_NTMA(2010+0/-90/0,,D,""""CUR=EUR"""" )-1"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 55).FormulaR1C1 = "=FDSB(RC[-55],""EC_MEAN_EPS_NTMA(2010,,D,""""CUR=EUR"""" )/ EC_MEAN_EPS_NTMA(2010+0/-180/0,,D,""""CUR=EUR"""" )-1"" )"
 
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 56).FormulaR1C1 = "=FDSB(RC[-56],""EC_MED_PE(2010,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 57).FormulaR1C1 = "=FDSB(RC[-57],""EC_MED_PE(2011,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 58).FormulaR1C1 = "=FDSB(RC[-58],""EC_MED_PE(2012,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 59).FormulaR1C1 = "=FDSB(RC[-59],""EC_MED_PE(2013,,D,""""CUR=EUR"""" )"" )"
 
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 60).FormulaR1C1 = "=FDSB(RC[-60],""ECA_MED_EBIT(2010,,D,""""CUR=EUR"""" ) / ECA_MED_SALES(2010,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 61).FormulaR1C1 = "=FDSB(RC[-61],""ECA_MED_EBIT(2011,,D,""""CUR=EUR"""" ) / ECA_MED_SALES(2011,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 62).FormulaR1C1 = "=FDSB(RC[-62],""ECA_MED_EBIT(2012,,D,""""CUR=EUR"""" ) / ECA_MED_SALES(2012,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 63).FormulaR1C1 = "=FDSB(RC[-63],""ECA_MED_EBIT(2013,,D,""""CUR=EUR"""" ) / ECA_MED_SALES(2013,,D,""""CUR=EUR"""" )"" )"
 
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 64).FormulaR1C1 = "=FDSB(RC[-64],""ECA_MED_EBITdA(2010,,D,""""CUR=EUR"""" ) / ECA_MED_SALES(2010,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 65).FormulaR1C1 = "=FDSB(RC[-65],""ECA_MED_EBITdA(2011,,D,""""CUR=EUR"""" ) / ECA_MED_SALES(2011,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 66).FormulaR1C1 = "=FDSB(RC[-66],""ECA_MED_EBITdA(2012,,D,""""CUR=EUR"""" ) / ECA_MED_SALES(2012,,D,""""CUR=EUR"""" )"" )"
Range(Cells(12, 1), Cells(12, 1).End(xlDown)).Offset(0, 67).FormulaR1C1 = "=FDSB(RC[-67],""ECA_MED_EBITdA(2013,,D,""""CUR=EUR"""" ) / ECA_MED_SALES(2013,,D,""""CUR=EUR"""" )"" )"
 
Application.ExecuteExcel4Macro "FDSFORCERECALC(FALSE)"
 
     
Range(Cells(12, 1), Cells(12, 1).End(xlDown).End(xlToRight)).Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues
 
 
Cells(2, 2).Select
   Selection.FormulaR1C1 = "=TODAY()"
   Selection.Copy
   Selection.PasteSpecial Paste:=xlPasteValues
   Application.CutCopyMode = False
   
End Sub
 
Sub formatage()
 
Sheets("Indice_croise" ).Select
 
   Range("i:i,Ag:Aj" ).Select
    Selection.NumberFormat = "0.00"
     
    Range("J:L,Ak:An" ).Select
   Selection.NumberFormat = "#,0.0\%"
     
    Range("m:Af,As:az,Be:Bh" ).Select
   Selection.NumberFormat = "#,0.0x"
     
    Range("Ao:Av,Bb:Bd,Bi:Bp" ).Select
   Selection.NumberFormat = "0.00%"
   
   Range("Bb:Bd,j:l" ).Select
    Selection.FormatConditions.Delete
    Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlGreater, _
        Formula1:="0"
    Selection.FormatConditions(1).Font.ColorIndex = 5
    Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlLess, _
        Formula1:="0"
    Selection.FormatConditions(2).Font.ColorIndex = 3
     
     
End Sub
 
Sub croissant()
Range("A11:BP2000" ).Sort Key1:=Range("B12" ), Order1:=xlAscending, Header _
        :=xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom _
        , DataOption1:=xlSortNormal
     
 
End Sub
Sub decroissant()
Range("A11:BP2000" ).Sort Key1:=Range("B12" ), Order1:=xlDescending, Header _
        :=xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom _
        , DataOption1:=xlSortNormal
 
End Sub
 
Sub list()
 
   Range("E11" ).Select
    ActiveSheet.ListObjects.Add(xlSrcRange, Range("$E$11:$g$2000" ), , xlYes).Name _
        = "Liste1"

       
         
End Sub
 
Sub unlist()
    Range("E11" ).Select
    ActiveSheet.ListObjects("Liste1" ).unlist
     
     
End Sub


---------------
http://www.flickr.com/photos/saintellier_thibault/
Reply

Marsh Posté le 02-06-2010 à 09:17:21   

Reply

Marsh Posté le 02-06-2010 à 16:49:47    

Reply

Marsh Posté le 03-06-2010 à 08:22:57    

Reply

Marsh Posté le 03-06-2010 à 12:23:09    

Au lieu de faire des Up qui ne servent a rien... Vu que ton topic a été lu 36 fois, si tu expliquais plutot ce que tu veux faire, mettre un screen de ce a quoi ressemble ton fichier, que tu mettes ton code entre balise pour que ce soit lisible...
 
Parceque chez moi, juste la ligne rouge fonctionne tres bien.


Message édité par SuppotDeSaTante le 03-06-2010 à 12:24:04

---------------
Soyez malin, louez entre voisins !
Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed