Can someone tell me why this doesn't work the same way everytime? It's supposed to go to a certian range and "turn off" the top & bottom lines. Sometimes it works and sometimes it doesn't. What am I missing? (There is a bunch of code after this that works fine, so I've taken it out.)
Learning on my own, so sorry if this is really simple!
Application.ScreenUpdating = False
Application.DisplayAlerts = False
ActiveSheet.Unprotect Password:="hockey"
Const Spdsht = "B6:V863"
Const MetricNames = "B6:B864"
Const LastLine = "B864:V864"
Const TitleLine = "B4:V4"
Set DC = Range("K1")
Set Index = Range("J1")
Set MetricWanted = Range("P1")
Set Index2 = Range("O1")
Range("E5").Select
Selection.EntireRow.Hidden = False
Range(Spdsht).Select 'remove top & bottom lines
Selection.Borders(xlEdgeTop).LineStyle = xlNone
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
Learning on my own, so sorry if this is really simple!
Application.ScreenUpdating = False
Application.DisplayAlerts = False
ActiveSheet.Unprotect Password:="hockey"
Const Spdsht = "B6:V863"
Const MetricNames = "B6:B864"
Const LastLine = "B864:V864"
Const TitleLine = "B4:V4"
Set DC = Range("K1")
Set Index = Range("J1")
Set MetricWanted = Range("P1")
Set Index2 = Range("O1")
Range("E5").Select
Selection.EntireRow.Hidden = False
Range(Spdsht).Select 'remove top & bottom lines
Selection.Borders(xlEdgeTop).LineStyle = xlNone
Selection.Borders(xlEdgeBottom).LineStyle = xlNone