Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Attribute VB_Name = "Module1"
- Sub Macro1()
- '
- ' Macro1 Macro
- '
- '
- x = ActiveSheet.UsedRange.Rows.Count
- Range("A1", Range("A1").End(xlToRight)).Select
- Selection.Font.Bold = True
- 'Range("A1", Range("A1").End(xlDown).End(xlToRight)).Select
- 'Range("A1").SpecialCells(xlCellTypeLastCell).Select
- Range("A1", Cells.Find(What:="*", After:=[A1], SearchDirection:=xlPrevious)).Select
- With Selection
- .HorizontalAlignment = xlCenter
- .VerticalAlignment = xlCenter
- .WrapText = True
- .Orientation = 0
- .AddIndent = False
- .IndentLevel = 0
- .ShrinkToFit = False
- .ReadingOrder = xlContext
- .MergeCells = False
- End With
- 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
- End Sub
- Sub Macro2()
- '
- ' Macro2 Macro
- '
- '
- Range("A1", Range("A1").End(xlDown).End(xlToRight)).Select
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement