Este fórum está sendo desativado

Depois de 9 anos, este fórum será desativado. Mas calma.... estamos migrando para uma comunidade no DISCORD. Junte-se a nós.

ENTRAR PARA DISCORD

Tópicos relacionados a códigos VBA, gravação de macros, etc.
  • Avatar do usuário
#27171
Boa tarde!


Fiz um macro, e quero que ela se repita em todos os arquivos de uma pasta.

Código: Selecionar todos
    Workbooks.Open filename:= _
        "Z:\Projetos\Em andamento\FIBRIA\SEGUNDA ETAPA DE INSPEÇÃO\CHECKLIST\1º relatório\todos os checklist\3024-01-71-G-10453.xlsx"

    Range("B60").Select
    Selection.EntireRow.Insert
    Selection.EntireRow.Insert
    Range("C62").Select
    Selection.Copy
    Range("C60").Select
    ActiveSheet.Paste
    Application.CutCopyMode = False
    ActiveCell.FormulaR1C1 = "Abertura e fechamento de módulos ( vazio)"
    Range("C62").Select
    Selection.Copy
    Range("C61").Select
    ActiveSheet.Paste
    Application.CutCopyMode = False
    ActiveCell.FormulaR1C1 = "Abertura e fechamento de módulos (carregado)"
    Range("C63").Select
    Selection.Copy
    Range("C62").Select
    ActiveSheet.Paste
    Application.CutCopyMode = False
    ActiveCell.FormulaR1C1 = _
        "Funcionamento de travas das cabeceiras e centrais (vazio)"
    Range("C63").Select
    ActiveCell.FormulaR1C1 = _
        "Funcionamento de travas das cabeceiras e centrais (carregado)"
    Range("C49").Select
    Range(Selection, Selection.End(xlToRight)).Select
    Range(Selection, Selection.End(xlToLeft)).Select
    Range("C49:E50").Select
    Selection.Copy
    Range("C51:E72").Select
    Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
        SkipBlanks:=False, Transpose:=False
    Application.CutCopyMode = False
    Range("F49:I50").Select
    Selection.Copy
    Range("F51:I72").Select
    Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
        SkipBlanks:=False, Transpose:=False
    Application.CutCopyMode = False
    Range("J59").Select
    Selection.AutoFill Destination:=Range("J59:J62"), Type:=xlFillDefault
    Range("J59:J62").Select
    Range("B57:B58").Select
    Selection.AutoFill Destination:=Range("B57:B63"), Type:=xlFillDefault
    Range("B57:B63").Select
    ActiveWorkbook.Save
    ActiveWindow.Close
Obrigado!
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]

Estamos migrando para uma comunidade no Discord