Advertisement
Guest User

Random Thing#1

a guest
Oct 20th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Attribute VB_Name = "Module1"
  2. Sub Macro1()
  3. '
  4. ' Macro1 Macro
  5. '
  6.  
  7. '
  8.    x = ActiveSheet.UsedRange.Rows.Count
  9.     Range("A1", Range("A1").End(xlToRight)).Select
  10.     Selection.Font.Bold = True
  11.     'Range("A1", Range("A1").End(xlDown).End(xlToRight)).Select
  12.    'Range("A1").SpecialCells(xlCellTypeLastCell).Select
  13.    Range("A1", Cells.Find(What:="*", After:=[A1], SearchDirection:=xlPrevious)).Select
  14.    
  15.     With Selection
  16.         .HorizontalAlignment = xlCenter
  17.         .VerticalAlignment = xlCenter
  18.         .WrapText = True
  19.         .Orientation = 0
  20.         .AddIndent = False
  21.         .IndentLevel = 0
  22.         .ShrinkToFit = False
  23.         .ReadingOrder = xlContext
  24.         .MergeCells = False
  25.     End With
  26.     Selection.Borders(xlDiagonalDown).LineStyle = xlNone
  27.     Selection.Borders(xlDiagonalUp).LineStyle = xlNone
  28.     With Selection.Borders(xlEdgeLeft)
  29.         .LineStyle = xlContinuous
  30.         .ColorIndex = 0
  31.         .TintAndShade = 0
  32.         .Weight = xlThin
  33.     End With
  34.     With Selection.Borders(xlEdgeTop)
  35.         .LineStyle = xlContinuous
  36.         .ColorIndex = 0
  37.         .TintAndShade = 0
  38.         .Weight = xlThin
  39.     End With
  40.     With Selection.Borders(xlEdgeBottom)
  41.         .LineStyle = xlContinuous
  42.         .ColorIndex = 0
  43.         .TintAndShade = 0
  44.         .Weight = xlThin
  45.     End With
  46.     With Selection.Borders(xlEdgeRight)
  47.         .LineStyle = xlContinuous
  48.         .ColorIndex = 0
  49.         .TintAndShade = 0
  50.         .Weight = xlThin
  51.     End With
  52.     With Selection.Borders(xlInsideVertical)
  53.         .LineStyle = xlContinuous
  54.         .ColorIndex = 0
  55.         .TintAndShade = 0
  56.         .Weight = xlThin
  57.     End With
  58.     With Selection.Borders(xlInsideHorizontal)
  59.         .LineStyle = xlContinuous
  60.         .ColorIndex = 0
  61.         .TintAndShade = 0
  62.         .Weight = xlThin
  63.     End With
  64.    
  65. End Sub
  66. Sub Macro2()
  67. '
  68. ' Macro2 Macro
  69. '
  70.  
  71. '
  72.    Range("A1", Range("A1").End(xlDown).End(xlToRight)).Select
  73. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement