I have here a copy of the macro to leave my excel file like I wanted can you help me understand which modules I need to use?
These is the macro
Sub test12() ' ' test12 Macro ' ' Workbooks.Open Filename:="C:\Proyecto\csv\T3683.csv.xls" Range("A1:M1196").Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlInsideVertical) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlInsideHorizontal) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With Columns("B:B").EntireColumn.AutoFit Columns("E:E").EntireColumn.AutoFit Columns("H:H").EntireColumn.AutoFit Columns("I:I").EntireColumn.AutoFit ActiveWindow.SmallScroll Down:=-24 Rows("1:10").Select Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbov +e Rows("9:12").Select Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbov +e Range("A14").Select ActiveCell.FormulaR1C1 = "PATENTE" Range("B14").Select ActiveCell.FormulaR1C1 = "pedimento" Columns("C:D").Select Selection.Cut Destination:=Columns("N:O") Columns("C:D").Select Range("D1").Activate Selection.Delete Shift:=xlToLeft Range("D14").Select Columns("C:C").ColumnWidth = 6.71 Range("C14").Select ActiveCell.FormulaR1C1 = "documento" Range("D14").Select ActiveCell.FormulaR1C1 = "fec entra" Range("E14").Select ActiveCell.FormulaR1C1 = "fec salida" Range("F14").Select ActiveCell.FormulaR1C1 = "RFC imp/exp" Range("G14").Select ActiveCell.FormulaR1C1 = "CURP" Range("H14").Select ActiveCell.FormulaR1C1 = "peso bruto" Range("J14").Select ActiveCell.FormulaR1C1 = "contribuciones" Range("K14").Select ActiveCell.FormulaR1C1 = "banco" Range("L14").Select ActiveCell.FormulaR1C1 = "ped orig" Range("M14").Select ActiveCell.FormulaR1C1 = "ped recfif" Columns("I:I").Select Selection.Delete Shift:=xlToLeft Range("A14:L14").Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlInsideVertical) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlInsideHorizontal) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With Selection.Font.Bold = True With Selection.Font .ThemeColor = xlThemeColorLight2 .TintAndShade = 0.399975585192419 End With Range("E8").Select ActiveCell.FormulaR1C1 = _ "RELACION DE OPERACIONES CORRESPONDIENTES A LA SEMANA " With ActiveCell.Characters(Start:=1, Length:=53).Font .Name = "Arial" .FontStyle = "Normal" .Size = 10 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ColorIndex = xlAutomatic .TintAndShade = 0 .ThemeFont = xlThemeFontNone End With Range("E8").Select End Sub
I really apreciate your help
Thanks

In reply to Re^4: which module to use? by ArmandoG
in thread which module to use? by ArmandoG

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.