I have a spread sheet with the months across the columns and data down the rows. I want to write some code within my macro to have a dashed red line drawn down the right side of all the rows of the current month. How would I do this? Thank you!
I have a spread sheet with the months across the columns and data down the rows. I want to write some code within my macro to have a dashed red line drawn down the right side of all the rows of the current month. How would I do this? Thank you!
With Months in A1- L1. Select columns A - L, then
Use Conditional Formatting:
Please Login or Register to view this content.
Ben Van Johnson
Being so new to VBA I am having some trouble with what you have said to do. I have the months in cells C5-N5 and this is what I want it to do when it finds the correct month based on today's date (sept).
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlDash
.Color = -16776961
.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 = xlThin
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Here is a modified version of what I am working with. As you can see the red dashed line is to the right of August. I am trying to have code put into my macro that will automatically move that line to the right of September so that I don't have to manually change the cell references in the code every month.
Maybe:
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks