P
pwilson.bowdoin
I'm trying to create a macro that will cycle between border options.
(edgetop, edgeright,edgebottom, edgeleft, outline cell)
I have been trying to do this using the select case function but have
been unsuccessful. Is it possible to have multiple prerequisites with
the select case function?
My main problem is dealing with the (xlEdgetop) modifier in the select
case function.
Thanks for the help1
Sub ToggleBorders()
With Selection
Select Case .Borders.LineStyle
Case xlNone
.Borders(xlEdgeTop).LineStyle = xlContinuous
.Borders(xlEdgeRight).LineStyle = xlNone
.Borders(xlEdgeBottom).LineStyle = xlNone
.Borders(xlEdgeLeft).LineStyle = xlNone
End Select
End With
End Sub
(edgetop, edgeright,edgebottom, edgeleft, outline cell)
I have been trying to do this using the select case function but have
been unsuccessful. Is it possible to have multiple prerequisites with
the select case function?
My main problem is dealing with the (xlEdgetop) modifier in the select
case function.
Thanks for the help1
Sub ToggleBorders()
With Selection
Select Case .Borders.LineStyle
Case xlNone
.Borders(xlEdgeTop).LineStyle = xlContinuous
.Borders(xlEdgeRight).LineStyle = xlNone
.Borders(xlEdgeBottom).LineStyle = xlNone
.Borders(xlEdgeLeft).LineStyle = xlNone
End Select
End With
End Sub