I am trying to add a dashed line to a certain section of a column based on the current month. I have the months starting at C5 (JAN) and going D5 (FEB) E5 (MAR) and so on and I have the year merged and centered above the 12 months. I need the macro to know that it is currently MAY of 2014 so I need the code to put the dashed line on the left side of the column. Here is what I currently have and as you can see I have just put the column in there of where I want the line to go but I don't want to have to go in manually and change it every month. Any help would be greatly appreciated.
Range("G5:G40").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlDash
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlMedium
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
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Bookmarks