modulo_centrar_bordear.bas

  1. Attribute VB_Name = "modulo_centrar_bordear"
  2.  
  3. Sub MacroCentraBordea()
  4. Attribute MacroCentraBordea.VB_ProcData.VB_Invoke_Func = "j\n14"
  5. '
  6. ' MacroCentraBordea Macro
  7. '
  8. ' Acceso directo: CTRL+j
  9. '
  10. With Selection
  11. .HorizontalAlignment = xlGeneral
  12. .VerticalAlignment = xlCenter
  13. .WrapText = False
  14. .Orientation = 0
  15. .AddIndent = False
  16. .IndentLevel = 0
  17. .ShrinkToFit = False
  18. .ReadingOrder = xlContext
  19. .MergeCells = False
  20. End With
  21. With Selection
  22. .HorizontalAlignment = xlCenter
  23. .VerticalAlignment = xlCenter
  24. .WrapText = False
  25. .Orientation = 0
  26. .AddIndent = False
  27. .IndentLevel = 0
  28. .ShrinkToFit = False
  29. .ReadingOrder = xlContext
  30. .MergeCells = False
  31. End With
  32. Selection.Borders(xlDiagonalDown).LineStyle = xlNone
  33. Selection.Borders(xlDiagonalUp).LineStyle = xlNone
  34. With Selection.Borders(xlEdgeLeft)
  35. .LineStyle = xlContinuous
  36. .ThemeColor = 5
  37. .TintAndShade = 0
  38. .Weight = xlThin
  39. End With
  40. With Selection.Borders(xlEdgeTop)
  41. .LineStyle = xlContinuous
  42. .ThemeColor = 5
  43. .TintAndShade = 0
  44. .Weight = xlThin
  45. End With
  46. With Selection.Borders(xlEdgeBottom)
  47. .LineStyle = xlContinuous
  48. .ThemeColor = 5
  49. .TintAndShade = 0
  50. .Weight = xlThin
  51. End With
  52. With Selection.Borders(xlEdgeRight)
  53. .LineStyle = xlContinuous
  54. .ThemeColor = 5
  55. .TintAndShade = 0
  56. .Weight = xlThin
  57. End With
  58. Selection.Borders(xlInsideVertical).LineStyle = xlNone
  59. With Selection.Borders(xlInsideHorizontal)
  60. .LineStyle = xlContinuous
  61. .ThemeColor = 5
  62. .TintAndShade = 0
  63. .Weight = xlThin
  64. End With
  65. End Sub
  66.  

Proinf.net