hello
i create a macro to merge cell , put a border, insert yellow in the cell and type a text
.
how to create a button that i can press when i need to do it for other cell i want to do this action to?
here the code
Thanks
i create a macro to merge cell , put a border, insert yellow in the cell and type a text
.
how to create a button that i can press when i need to do it for other cell i want to do this action to?
here the code
VBA Code:
Sub Tickets_Received()
'
' Tickets_Received Macro
' Merge Cell highlight and Put Text
'
' Keyboard Shortcut: Ctrl+t
'
ActiveWindow.SmallScroll Down:=72
Range("I88").Select
ActiveWindow.SmallScroll Down:=-64
Range("F28:I28").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Selection.Merge
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlMedium
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlMedium
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlMedium
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlMedium
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 65535
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.Font
.ColorIndex = xlAutomatic
.TintAndShade = 0
End With
ActiveCell.FormulaR1C1 = "Received"
Range("F29").Select
End Sub
Thanks