none
Não consigo abrir uma planilha no Excel... diz erro no VB! Segue código do erro! [EXTREME URGÊNCIA] RRS feed

  • Pergunta

  • Sub Macro130()

    '

    ' Macro130 Macro

    ' Macro gravada em 30/09/2010 por FONTOURA LIMA MAIA MAIA

    '

    '

        Worksheets("Descrição").cmbGrupo.ListIndex = -1

        Worksheets("Descrição").cmbCredito.ListIndex = -1

        Worksheets("Descrição").cmbOpPgto.ListIndex = -1

        Application.Run "'APRESENTAÇÃO FM.xls'!Macro174"

        Application.Run "'APRESENTAÇÃO FM.xls'!Macro173"

        Application.Run "'APRESENTAÇÃO FM.xls'!Macro2"

        Application.Run "'APRESENTAÇÃO FM.xls'!Macro171"

        Application.Run "'APRESENTAÇÃO FM.xls'!Macro92"

        Range("E18:E19").Select

        ActiveCell.FormulaR1C1 = "0"

        Range("E21:E22").Select

        ActiveCell.FormulaR1C1 = "0"

        Range("E23").Select

        Application.Run "'APRESENTAÇÃO FM.xls'!Macro4"

        Application.Run "'APRESENTAÇÃO FM.xls'!Macro105"

        Application.Run "'APRESENTAÇÃO FM.xls'!Macro104"

        ActiveWindow.ScrollRow = 2

        ActiveWindow.ScrollRow = 3

        ActiveWindow.ScrollRow = 4

        ActiveWindow.ScrollRow = 5

        ActiveWindow.ScrollRow = 6

        ActiveWindow.ScrollRow = 7

        ActiveWindow.ScrollRow = 8

        ActiveWindow.ScrollRow = 9

        ActiveWindow.ScrollRow = 10

        ActiveWindow.ScrollRow = 16

        ActiveWindow.ScrollRow = 17

        ActiveWindow.ScrollRow = 18

        ActiveWindow.ScrollRow = 19

        ActiveWindow.ScrollRow = 20

        ActiveWindow.ScrollRow = 21

        ActiveWindow.ScrollRow = 22

        ActiveWindow.ScrollRow = 23

        Range("E44:F44").Select

        ActiveCell.FormulaR1C1 = "0"

        Range("G50").Select

        ActiveCell.FormulaR1C1 = "0"

        Range("G51").Select

        ActiveWindow.ScrollRow = 22

        ActiveWindow.ScrollRow = 21

        ActiveWindow.ScrollRow = 20

        ActiveWindow.ScrollRow = 18

        ActiveWindow.ScrollRow = 16

        ActiveWindow.ScrollRow = 14

        ActiveWindow.ScrollRow = 9

        ActiveWindow.ScrollRow = 8

        ActiveWindow.ScrollRow = 7

        ActiveWindow.ScrollRow = 6

        ActiveWindow.ScrollRow = 5

        ActiveWindow.ScrollRow = 4

        ActiveWindow.ScrollRow = 3

        ActiveWindow.ScrollRow = 2

        ActiveWindow.ScrollRow = 1

        Sheets("Tab Imp").Select

        Range("O1").Select

        ActiveWindow.ScrollRow = 2

        ActiveWindow.ScrollRow = 3

        ActiveWindow.ScrollRow = 5

        ActiveWindow.ScrollRow = 6

        ActiveWindow.ScrollRow = 7

        ActiveWindow.ScrollRow = 9

        ActiveWindow.ScrollRow = 10

        ActiveWindow.ScrollRow = 11

        ActiveWindow.ScrollRow = 13

        ActiveWindow.ScrollRow = 15

        ActiveWindow.ScrollRow = 23

        ActiveWindow.ScrollRow = 25

        ActiveWindow.ScrollRow = 31

        ActiveWindow.ScrollRow = 33

        ActiveWindow.ScrollRow = 34

        ActiveWindow.ScrollRow = 36

        ActiveWindow.ScrollRow = 37

        ActiveWindow.ScrollRow = 38

        ActiveWindow.ScrollRow = 39

        ActiveWindow.ScrollRow = 40

        ActiveWindow.ScrollRow = 41

        ActiveWindow.ScrollRow = 48

        ActiveWindow.ScrollRow = 50

        ActiveWindow.ScrollRow = 51

        ActiveWindow.ScrollRow = 52

        ActiveWindow.ScrollRow = 51

        ActiveWindow.ScrollRow = 49

        ActiveWindow.ScrollRow = 43

        ActiveWindow.ScrollRow = 33

        ActiveWindow.ScrollRow = 31

        ActiveWindow.ScrollRow = 30

        ActiveWindow.ScrollRow = 29

        ActiveWindow.ScrollRow = 23

        ActiveWindow.ScrollRow = 13

        ActiveWindow.ScrollRow = 5

        ActiveWindow.ScrollRow = 2

        ActiveWindow.ScrollRow = 1

        Sheets("Compra imóvel").Select

        ActiveWindow.ScrollRow = 2

        ActiveWindow.ScrollRow = 3

        ActiveWindow.ScrollRow = 4

        ActiveWindow.ScrollRow = 3

        ActiveWindow.ScrollRow = 2

        ActiveWindow.ScrollRow = 1

        Sheets("Amortização").Select

        ActiveWindow.ScrollRow = 2

        ActiveWindow.ScrollRow = 3

        ActiveWindow.ScrollRow = 4

        ActiveWindow.ScrollRow = 5

        ActiveWindow.ScrollRow = 9

        ActiveWindow.ScrollRow = 10

        ActiveWindow.ScrollRow = 11

        ActiveWindow.ScrollRow = 12

        ActiveWindow.ScrollRow = 13

        ActiveWindow.ScrollRow = 15

        ActiveWindow.ScrollRow = 17

        ActiveWindow.ScrollRow = 18

        ActiveWindow.ScrollRow = 20

        ActiveWindow.ScrollRow = 21

        ActiveWindow.ScrollRow = 22

        ActiveWindow.ScrollRow = 23

        ActiveWindow.ScrollRow = 24

        ActiveWindow.ScrollRow = 26

        ActiveWindow.ScrollRow = 27

        ActiveWindow.ScrollRow = 28

        ActiveWindow.ScrollRow = 32

        ActiveWindow.ScrollRow = 33

        ActiveWindow.ScrollRow = 34

        ActiveWindow.ScrollRow = 35

        ActiveWindow.ScrollRow = 36

        ActiveWindow.ScrollRow = 37

        ActiveWindow.ScrollRow = 38

        ActiveWindow.ScrollRow = 37

        ActiveWindow.ScrollRow = 35

        ActiveWindow.ScrollRow = 32

        ActiveWindow.ScrollRow = 18

        ActiveWindow.ScrollRow = 16

        ActiveWindow.ScrollRow = 15

        ActiveWindow.ScrollRow = 14

        ActiveWindow.ScrollRow = 12

        ActiveWindow.ScrollRow = 11

        ActiveWindow.ScrollRow = 9

        ActiveWindow.ScrollRow = 8

        ActiveWindow.ScrollRow = 3

        ActiveWindow.ScrollRow = 2

        ActiveWindow.ScrollRow = 1


    terça-feira, 26 de janeiro de 2016 17:49

Todas as Respostas

  • Sheets("Liberações").Select

        ActiveWindow.ScrollRow = 2

        ActiveWindow.ScrollRow = 3

        ActiveWindow.ScrollRow = 2

        ActiveWindow.ScrollRow = 1

        Sheets("Lance Fixo").Select

        ActiveWindow.ScrollRow = 2

        ActiveWindow.ScrollRow = 3

        ActiveWindow.ScrollRow = 2

        ActiveWindow.ScrollRow = 1

        Sheets("Créditos").Select

        ActiveWindow.ScrollRow = 114

        ActiveWindow.ScrollRow = 113

        ActiveWindow.ScrollRow = 112

        ActiveWindow.ScrollRow = 110

        ActiveWindow.ScrollRow = 108

        ActiveWindow.ScrollRow = 106

        ActiveWindow.ScrollRow = 103

        ActiveWindow.ScrollRow = 99

        ActiveWindow.ScrollRow = 94

        ActiveWindow.ScrollRow = 91

        ActiveWindow.ScrollRow = 88

        ActiveWindow.ScrollRow = 85

        ActiveWindow.ScrollRow = 71

        ActiveWindow.ScrollRow = 65

        ActiveWindow.ScrollRow = 62

        ActiveWindow.ScrollRow = 57

        ActiveWindow.ScrollRow = 54

        ActiveWindow.ScrollRow = 51

        ActiveWindow.ScrollRow = 49

        ActiveWindow.ScrollRow = 48

        ActiveWindow.ScrollRow = 46

        ActiveWindow.ScrollRow = 42

        ActiveWindow.ScrollRow = 41

        ActiveWindow.ScrollRow = 40

        ActiveWindow.ScrollRow = 39

        ActiveWindow.ScrollRow = 38

        ActiveWindow.ScrollRow = 37

        ActiveWindow.ScrollRow = 36

        ActiveWindow.ScrollRow = 35

        ActiveWindow.ScrollRow = 34

        ActiveWindow.ScrollRow = 33

        ActiveWindow.ScrollRow = 30

        ActiveWindow.ScrollRow = 26

        ActiveWindow.ScrollRow = 22

        ActiveWindow.ScrollRow = 19

        ActiveWindow.ScrollRow = 16

        ActiveWindow.ScrollRow = 14

        ActiveWindow.ScrollRow = 11

        ActiveWindow.ScrollRow = 10

        ActiveWindow.ScrollRow = 9

        ActiveWindow.ScrollRow = 7

        ActiveWindow.ScrollRow = 6

        ActiveWindow.ScrollRow = 5

        ActiveWindow.ScrollRow = 3

        ActiveWindow.ScrollRow = 1

        ActiveWindow.ScrollRow = 2

        ActiveWindow.ScrollRow = 4

        ActiveWindow.ScrollRow = 7

        ActiveWindow.ScrollRow = 14

        ActiveWindow.ScrollRow = 15

        ActiveWindow.ScrollRow = 16

        ActiveWindow.ScrollRow = 17

        ActiveWindow.ScrollRow = 20

        ActiveWindow.ScrollRow = 22

        ActiveWindow.ScrollRow = 25

        ActiveWindow.ScrollRow = 28

        ActiveWindow.ScrollRow = 31

        ActiveWindow.ScrollRow = 41

        ActiveWindow.ScrollRow = 43

        ActiveWindow.ScrollRow = 45

        ActiveWindow.ScrollRow = 47

        ActiveWindow.ScrollRow = 50

        ActiveWindow.ScrollRow = 53

        ActiveWindow.ScrollRow = 54

        ActiveWindow.ScrollRow = 57

        ActiveWindow.ScrollRow = 59

        ActiveWindow.ScrollRow = 70

        ActiveWindow.ScrollRow = 72

        ActiveWindow.ScrollRow = 73

        ActiveWindow.ScrollRow = 76

        ActiveWindow.ScrollRow = 79

        ActiveWindow.ScrollRow = 80

        ActiveWindow.ScrollRow = 81

        ActiveWindow.ScrollRow = 82

        ActiveWindow.ScrollRow = 83

        ActiveWindow.ScrollRow = 84

        ActiveWindow.ScrollRow = 86

        ActiveWindow.ScrollRow = 88

        ActiveWindow.ScrollRow = 90

        ActiveWindow.ScrollRow = 91

        ActiveWindow.ScrollRow = 92

        ActiveWindow.ScrollRow = 93

        ActiveWindow.ScrollRow = 95

        ActiveWindow.ScrollRow = 96

        ActiveWindow.ScrollRow = 97

        ActiveWindow.ScrollRow = 98

        ActiveWindow.ScrollRow = 99

        ActiveWindow.ScrollRow = 100

        ActiveWindow.ScrollRow = 103

        ActiveWindow.ScrollRow = 104

        ActiveWindow.ScrollRow = 105

        ActiveWindow.ScrollRow = 107

        ActiveWindow.ScrollRow = 109

        ActiveWindow.ScrollRow = 115

        ActiveWindow.ScrollRow = 117

        ActiveWindow.ScrollRow = 119

        ActiveWindow.ScrollRow = 120

        ActiveWindow.ScrollRow = 123

        Application.Run "'APRESENTAÇÃO FM.xls'!Macro183"

        Sheets("Créditos").Select

        ActiveWindow.ScrollRow = 122

        ActiveWindow.ScrollRow = 108

        ActiveWindow.ScrollRow = 100

        ActiveWindow.ScrollRow = 91

        ActiveWindow.ScrollRow = 81

        ActiveWindow.ScrollRow = 71

        ActiveWindow.ScrollRow = 63

        ActiveWindow.ScrollRow = 60

        ActiveWindow.ScrollRow = 58

        ActiveWindow.ScrollRow = 57

        ActiveWindow.ScrollRow = 56

        ActiveWindow.ScrollRow = 55

        ActiveWindow.ScrollRow = 54

        ActiveWindow.ScrollRow = 53

        ActiveWindow.ScrollRow = 52

        ActiveWindow.ScrollRow = 51

        ActiveWindow.ScrollRow = 49

        ActiveWindow.ScrollRow = 47

        ActiveWindow.ScrollRow = 43

        ActiveWindow.ScrollRow = 38

        ActiveWindow.ScrollRow = 35

        ActiveWindow.ScrollRow = 31

        ActiveWindow.ScrollRow = 27

        ActiveWindow.ScrollRow = 26

        ActiveWindow.ScrollRow = 23

        ActiveWindow.ScrollRow = 22

        ActiveWindow.ScrollRow = 21

        ActiveWindow.ScrollRow = 20

        ActiveWindow.ScrollRow = 16

        ActiveWindow.ScrollRow = 12

        ActiveWindow.ScrollRow = 10

        ActiveWindow.ScrollRow = 9

        ActiveWindow.ScrollRow = 8

        ActiveWindow.ScrollRow = 7

        ActiveWindow.ScrollRow = 5

        ActiveWindow.ScrollRow = 2

        ActiveWindow.ScrollRow = 1

    terça-feira, 26 de janeiro de 2016 17:49
  • Application.Run "'APRESENTAÇÃO FM.xls'!Macro157"

        Sheets("EX").Select

        Range("D10:D11").Select

        ActiveCell.FormulaR1C1 = "0"

        Range("D17:D18").Select

        ActiveCell.FormulaR1C1 = "0"

        Range("D19").Select

        Sheets("SL").Select

        Range("H5").Select

        ActiveCell.FormulaR1C1 = "0"

        Range("H6").Select

        ActiveCell.FormulaR1C1 = "0"

        Range("H7").Select

        ActiveCell.FormulaR1C1 = "0"

        Range("H8").Select

        ActiveCell.FormulaR1C1 = "0"

        Range("I5").Select

        ActiveCell.FormulaR1C1 = "0"

        Range("I6").Select

        ActiveCell.FormulaR1C1 = "0"

        Range("I7").Select

        ActiveCell.FormulaR1C1 = "0"

        Range("I8").Select

        ActiveCell.FormulaR1C1 = "0"

        Range("J5").Select

        ActiveCell.FormulaR1C1 = "0.001"

        Range("J6").Select

        ActiveCell.FormulaR1C1 = "0.001"

        Range("J7").Select

        ActiveCell.FormulaR1C1 = "0.001"

        Range("J8").Select

        ActiveCell.FormulaR1C1 = "0.001"

        Range("K5").Select

        ActiveCell.FormulaR1C1 = "1"

        Range("K6").Select

        ActiveCell.FormulaR1C1 = "1"

        Range("K7").Select

        ActiveCell.FormulaR1C1 = "1"

        Range("K8").Select

        ActiveCell.FormulaR1C1 = "1"

        Range("L5").Select

        ActiveCell.FormulaR1C1 = "1"

        Range("L6").Select

        ActiveCell.FormulaR1C1 = "1"

        Range("L7").Select

        ActiveCell.FormulaR1C1 = "1"

        Range("L8").Select

        ActiveCell.FormulaR1C1 = "1"

        Range("I13").Select

        ActiveCell.FormulaR1C1 = "0"

        Range("I14").Select

        ActiveCell.FormulaR1C1 = "0"

        Range("I15").Select

        ActiveCell.FormulaR1C1 = "0"

        Range("I16").Select

        ActiveCell.FormulaR1C1 = "0"

        Range("I22").Select

        ActiveCell.FormulaR1C1 = "0"

        Range("J22").Select

        ActiveCell.FormulaR1C1 = "0"

        Range("O21").Select

        ActiveCell.FormulaR1C1 = "1"

        Range("O22").Select

        ActiveCell.FormulaR1C1 = "1"

        Range("O23").Select

        ActiveCell.FormulaR1C1 = "1"

        Range("O24").Select

        ActiveCell.FormulaR1C1 = "1"

        Range("O25").Select

        

        Application.Run "'APRESENTAÇÃO FM.xls'!Macro185"

        Application.Run "'APRESENTAÇÃO FM.xls'!Macro184"

        ActiveWindow.ScrollRow = 2

        ActiveWindow.ScrollRow = 3

        ActiveWindow.ScrollRow = 4

        ActiveWindow.ScrollRow = 5

        ActiveWindow.ScrollRow = 6

        ActiveWindow.ScrollRow = 7

        ActiveWindow.ScrollRow = 6

        ActiveWindow.ScrollRow = 5

        ActiveWindow.ScrollRow = 4

        ActiveWindow.ScrollRow = 3

        ActiveWindow.ScrollRow = 2

        ActiveWindow.ScrollRow = 1

        Sheets("POR QUE INVESTIR").Select

        Range("J18").Select

        ActiveCell.FormulaR1C1 = "0"

        Range("J19").Select

        Application.Run "'APRESENTAÇÃO FM.xls'!Macro131"

        Application.Run "'APRESENTAÇÃO FM.xls'!Macro95"

        Application.Run "'APRESENTAÇÃO FM.xls'!Macro94"

        Application.Run "'APRESENTAÇÃO FM.xls'!Macro95"

        ActiveWindow.ScrollRow = 2

        ActiveWindow.ScrollRow = 3

        ActiveWindow.ScrollRow = 4

        ActiveWindow.ScrollRow = 5

        ActiveWindow.ScrollRow = 6

        ActiveWindow.ScrollRow = 8

        ActiveWindow.ScrollRow = 9

        ActiveWindow.ScrollRow = 13

        ActiveWindow.ScrollRow = 14

        ActiveWindow.ScrollRow = 15

        ActiveWindow.ScrollRow = 16

        ActiveWindow.ScrollRow = 18

        ActiveWindow.ScrollRow = 19

        ActiveWindow.ScrollRow = 20

        ActiveWindow.ScrollRow = 22

        ActiveWindow.ScrollRow = 23

        ActiveWindow.ScrollRow = 26

        ActiveWindow.ScrollRow = 27

        ActiveWindow.ScrollRow = 28

        ActiveWindow.ScrollRow = 29

        ActiveWindow.ScrollRow = 30

        ActiveWindow.ScrollRow = 31

        ActiveWindow.ScrollRow = 32

        ActiveWindow.ScrollRow = 33

        ActiveWindow.ScrollRow = 34

        ActiveWindow.ScrollRow = 36

        ActiveWindow.ScrollRow = 37

        ActiveWindow.ScrollRow = 31

        ActiveWindow.ScrollRow = 29

        ActiveWindow.ScrollRow = 27

        ActiveWindow.ScrollRow = 26

        ActiveWindow.ScrollRow = 25

        ActiveWindow.ScrollRow = 24

        ActiveWindow.ScrollRow = 22

        ActiveWindow.ScrollRow = 21

        ActiveWindow.ScrollRow = 18

        ActiveWindow.ScrollRow = 10

        ActiveWindow.ScrollRow = 9

        ActiveWindow.ScrollRow = 8

        ActiveWindow.ScrollRow = 7

        ActiveWindow.ScrollRow = 6

        ActiveWindow.ScrollRow = 5

        ActiveWindow.ScrollRow = 4

        ActiveWindow.ScrollRow = 3

        ActiveWindow.ScrollRow = 2

        ActiveWindow.ScrollRow = 1

        Sheets("Perfil").Select

        Range("G16:J17").Select

        ActiveCell.FormulaR1C1 = "0"

        Range("G18").Select

    terça-feira, 26 de janeiro de 2016 17:50
  • Sheets("Rentabilidade").Select

        Application.Run "'APRESENTAÇÃO FM.xls'!Macro91"

        Application.Run "'APRESENTAÇÃO FM.xls'!Macro90"

        Sheets("Seguro").Select

        Application.Run "'APRESENTAÇÃO FM.xls'!Macro89"

        Application.Run "'APRESENTAÇÃO FM.xls'!Macro88"

        Sheets("INCC").Select

        Application.Run "'APRESENTAÇÃO FM.xls'!Macro117"

        Application.Run "'APRESENTAÇÃO FM.xls'!Macro116"

        Sheets("GR 370").Select

        ActiveWindow.ScrollRow = 2

        ActiveWindow.ScrollRow = 1

        Sheets("GR 420").Select

        ActiveWindow.ScrollRow = 17

        ActiveWindow.ScrollRow = 16

        ActiveWindow.ScrollRow = 15

        ActiveWindow.ScrollRow = 13

        ActiveWindow.ScrollRow = 12

        ActiveWindow.ScrollRow = 11

        ActiveWindow.ScrollRow = 9

        ActiveWindow.ScrollRow = 8

        ActiveWindow.ScrollRow = 5

        ActiveWindow.ScrollRow = 2

        ActiveWindow.ScrollRow = 1

        Sheets("Relatorio 420").Select

        Range("N28").Select

        Sheets("Relatorio 430").Select

        ActiveWindow.ScrollWorkbookTabs "box-sizing:border-box;margin-bottom:0px;border:0px;font-family:'Segoe UI', Arial, sans-serif;padding-right:0px;padding-vertical-align:top;-webkit-font-smoothing:antialiased;min-height:19px;color:#333333;font-size:15px;">    Sheets("Descrição").Select

    End Sub

    terça-feira, 26 de janeiro de 2016 17:50
  • Quando o código der erro, clique em depurar e nos diga qual a linha aparece selecionada em amarelo

    André Santo | basevba.wordpress.com

    terça-feira, 26 de janeiro de 2016 18:35