Advertisement
Guest User

Untitled

a guest
Oct 27th, 2014
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ' Region Description
  2. '
  3. ' Name:
  4. ' Author:
  5. ' Version:
  6. ' Description:
  7. '
  8. '
  9. ' EndRegion
  10.  
  11. Const xlUnderlineStyleNone = -4142
  12. Const xlThemeColorLight1 = 2
  13. Const xlThemeFontMinor = 2
  14. Const xlThemeColorLight2 = 4
  15. Const xlCenter = -4108
  16. Const xlBottom = -4107
  17. Const xlContext = -5002
  18. Const xlNone = -4142
  19. Const xlEdgeBottom = 9
  20. Const xlDouble = -4119
  21. Const xlThick = 4
  22. Const xlGeneral = 1
  23. Set xl = CreateObject("Excel.Application")
  24. xl.Visible = True  'set to False for production
  25.  
  26. Set wb = xl.Workbooks.Open("C:\Users\rbelenyesi\Desktop\Batcholas\as.xlsx")
  27. Sub DailyWarRoom()
  28.  
  29. ' DailyWarRoom Macro
  30.  
  31. ' Format
  32.    wb.Sheets(1).Range("H2:H35").NumberFormat = "m/d/yyyy"
  33.     wb.Sheets(1).Range("S2:S35").NumberFormat = "m/d/yyyy"
  34.     wb.Sheets(1).Range("T2:T33").NumberFormat = "m/d/yyyy"
  35.     wb.Sheets(1).Range("H2:H35").NumberFormat = "m/d/yyyy"
  36.    
  37.     wb.Sheets(1).Range("A1:T1").Select
  38.     Application.CutCopyMode = False
  39.     With Selection.Font
  40.         .Name = "Calibri"
  41.         .Size = 13
  42.         .Strikethrough = False
  43.         .Superscript = False
  44.         .Subscript = False
  45.         .OutlineFont = False
  46.         .Shadow = False
  47.         .Underline = xlUnderlineStyleNone
  48.         .ThemeColor = xlThemeColorLight1
  49.         .TintAndShade = 0
  50.         .ThemeFont = xlThemeFontMinor
  51.     End With
  52.     Selection.Font.Bold = True
  53.     With Selection.Font
  54.         .ThemeColor = xlThemeColorLight2
  55.         .TintAndShade = 0
  56.     End With
  57.     With Selection
  58.         .HorizontalAlignment = xlCenter
  59.         .VerticalAlignment = xlBottom
  60.         .Orientation = 0
  61.         .AddIndent = False
  62.         .IndentLevel = 0
  63.         .ShrinkToFit = False
  64.         .ReadingOrder = xlContext
  65.         .MergeCells = False
  66.     End With
  67.     With Selection
  68.         .HorizontalAlignment = xlCenter
  69.         .VerticalAlignment = xlCenter
  70.         .Orientation = 0
  71.         .AddIndent = False
  72.         .IndentLevel = 0
  73.         .ShrinkToFit = False
  74.         .ReadingOrder = xlContext
  75.         .MergeCells = False
  76.     End With
  77.     Selection.Borders(xlDiagonalDown).LineStyle = xlNone
  78.     Selection.Borders(xlDiagonalUp).LineStyle = xlNone
  79.     Selection.Borders(xlEdgeLeft).LineStyle = xlNone
  80.     Selection.Borders(xlEdgeTop).LineStyle = xlNone
  81.     With Selection.Borders(xlEdgeBottom)
  82.         .LineStyle = xlDouble
  83.         .Color = -1389396
  84.         .TintAndShade = 0
  85.         .Weight = xlThick
  86.     End With
  87.     Selection.Borders(xlEdgeRight).LineStyle = xlNone
  88.     Selection.Borders(xlInsideVertical).LineStyle = xlNone
  89.     Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
  90.     Cells.Select
  91.     With Selection
  92.         .HorizontalAlignment = xlGeneral
  93.         .Orientation = 0
  94.         .AddIndent = False
  95.         .IndentLevel = 0
  96.         .ShrinkToFit = False
  97.         .ReadingOrder = xlContext
  98.         .MergeCells = False
  99.     End With
  100.     With Selection
  101.         .HorizontalAlignment = xlCenter
  102.         .Orientation = 0
  103.         .AddIndent = False
  104.         .IndentLevel = 0
  105.         .ShrinkToFit = False
  106.         .ReadingOrder = xlContext
  107.         .MergeCells = False
  108.     End With
  109.     With Selection
  110.         .HorizontalAlignment = xlCenter
  111.         .VerticalAlignment = xlBottom
  112.         .Orientation = 0
  113.         .AddIndent = False
  114.         .IndentLevel = 0
  115.         .ShrinkToFit = False
  116.         .ReadingOrder = xlContext
  117.         .MergeCells = False
  118.     End With
  119.     With Selection
  120.         .HorizontalAlignment = xlCenter
  121.         .VerticalAlignment = xlCenter
  122.         .Orientation = 0
  123.         .AddIndent = False
  124.         .IndentLevel = 0
  125.         .ShrinkToFit = False
  126.         .ReadingOrder = xlContext
  127.         .MergeCells = False
  128.     End With
  129.     Columns("C:C").Select
  130.     With Selection
  131.         .HorizontalAlignment = xlLeft
  132.         .VerticalAlignment = xlCenter
  133.         .WrapText = False
  134.         .Orientation = 0
  135.         .AddIndent = False
  136.         .IndentLevel = 0
  137.         .ShrinkToFit = False
  138.         .ReadingOrder = xlContext
  139.         .MergeCells = False
  140.     End With
  141.     Range("C1").Select
  142.     With Selection
  143.         .HorizontalAlignment = xlCenter
  144.         .VerticalAlignment = xlCenter
  145.         .WrapText = False
  146.         .Orientation = 0
  147.         .AddIndent = False
  148.         .IndentLevel = 0
  149.         .ShrinkToFit = False
  150.         .ReadingOrder = xlContext
  151.         .MergeCells = False
  152.     End With
  153.     wb.Sheets(1).Range("B1").Select
  154.     ActiveCell.FormulaR1C1 = "Ticket ID"
  155.     wb.Sheets(1).Range("C1").Select
  156.     ActiveCell.FormulaR1C1 = "Title"
  157.     wb.Sheets(1).Range("D1").Select
  158.     ActiveCell.FormulaR1C1 = "Ticket step"
  159.     wb.Sheets(1).Range("E1").Select
  160.     ActiveCell.FormulaR1C1 = "Priority"
  161.     wb.Sheets(1).Range("G1").Select
  162.     ActiveCell.FormulaR1C1 = "Note"
  163.     wb.Sheets(1).Range("H1").Select
  164.     ActiveCell.FormulaR1C1 = "Reported on"
  165.     wb.Sheets(1).Range("I1").Select
  166.     ActiveCell.FormulaR1C1 = "Fix planned at"
  167.     wb.Sheets(1).Range("J1").Select
  168.     ActiveCell.FormulaR1C1 = "Mantis ID"
  169.     Cells.Select
  170.     Cells.EntireColumn.AutoFit
  171.     wb.Sheets(1).Range("H3").Select
  172.     Columns("G:G").ColumnWidth = 40.71
  173.     Columns("J:J").ColumnWidth = 10.71
  174.     Columns("F:F").Select
  175.     Selection.EntireColumn.Hidden = True
  176.     Columns("N:N").Select
  177.     Columns("N:Q").Select
  178.     Selection.EntireColumn.Hidden = True
  179.    
  180.     wb.Sheets(1).Range("K2").Select
  181.  
  182.       Do Until IsEmpty(ActiveCell)
  183.          If ActiveCell.Value = "closed" Then
  184.     ActiveCell.Interior.Color = RGB(232, 232, 232)
  185.     End If
  186.    
  187.     If ActiveCell.Value = "rejected" Then
  188.     ActiveCell.Interior.Color = RGB(163, 132, 114)
  189.     End If
  190.    
  191.     If ActiveCell.Value = "released" Then
  192.     ActiveCell.Interior.Color = RGB(187, 187, 187)
  193.     End If
  194.    
  195.     If ActiveCell.Value = "tested" Then
  196.     ActiveCell.Interior.Color = RGB(170, 255, 170)
  197.     End If
  198.    
  199.     If ActiveCell.Value = "devtested" Then
  200.     ActiveCell.Interior.Color = RGB(188, 221, 74)
  201.     End If
  202.    
  203.     If ActiveCell.Value = "integrated" Then
  204.     ActiveCell.Interior.Color = RGB(44, 212, 127)
  205.     End If
  206.    
  207.     If ActiveCell.Value = "resolved" Then
  208.     ActiveCell.Interior.Color = RGB(204, 238, 221)
  209.     End If
  210.    
  211.     If ActiveCell.Value = "assigned" Then
  212.     ActiveCell.Interior.Color = RGB(200, 200, 255)
  213.     End If
  214.    
  215.     If ActiveCell.Value = "confirmed" Then
  216.     ActiveCell.Interior.Color = RGB(255, 255, 176)
  217.     End If
  218.    
  219.     If ActiveCell.Value = "assignedtorepro" Then
  220.     ActiveCell.Interior.Color = RGB(238, 152, 4)
  221.     End If
  222.    
  223.     If ActiveCell.Value = "acknowledged" Then
  224.     ActiveCell.Interior.Color = RGB(255, 216, 80)
  225.     End If
  226.    
  227.     If ActiveCell.Value = "rejectcandidate" Then
  228.     ActiveCell.Interior.Color = RGB(246, 64, 81)
  229.     End If
  230.    
  231.     If ActiveCell.Value = "feedback" Then
  232.     ActiveCell.Interior.Color = RGB(255, 80, 168)
  233.     End If
  234.    
  235.     If ActiveCell.Value = "new" Then
  236.     ActiveCell.Interior.Color = RGB(255, 160, 160)
  237.     End If
  238.     ActiveCell.Offset(1, 0).Select
  239. Loop
  240. wb.Sheets(1).Range("A1:T30").Select
  241. Selection.RowHeight = 15
  242.  
  243.     ' Noteok balra rendezes
  244.    Range("G2:G9").Select
  245.     With Selection
  246.         .HorizontalAlignment = xlLeft
  247.         .VerticalAlignment = xlCenter
  248.         .WrapText = False
  249.         .Orientation = 0
  250.         .AddIndent = False
  251.         .IndentLevel = 0
  252.         .ShrinkToFit = False
  253.         .ReadingOrder = xlContext
  254.         .MergeCells = False
  255.     End With
  256.  
  257. End Sub
  258.  
  259. wb.Save
  260. 'x1.Quit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement