I am using Excel to tabulate scores for my employees. We work in a very busy and open office, so there is a need to be able to obfuscate the scores, but also help keep from losing my place while punching the scores.
I would like it to be able to return to the last cell that I was punching a score in... I believe I have become confused in using "ActiveCell.SpecialCells(xlLastCell).Select" as I think it wants to reselect the last used range as the last cell... How do I find the last used cell before the range of cells was selected? Any suggestions of a better approach to "hiding" the scores is also appreciated.
Thanks,
David
EDIT: Added code tags - Moderator
I would like it to be able to return to the last cell that I was punching a score in... I believe I have become confused in using "ActiveCell.SpecialCells(xlLastCell).Select" as I think it wants to reselect the last used range as the last cell... How do I find the last used cell before the range of cells was selected? Any suggestions of a better approach to "hiding" the scores is also appreciated.
Thanks,
David
Code:
Sub Hide_Scores()
Range("B15:EU35").Select
ActiveSheet.Unprotect
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
With Selection.Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 2
End With
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
x = ActiveSheet.UsedRange.Rows.Count
ActiveCell.SpecialCells(xlLastCell).Select
End Sub
EDIT: Added code tags - Moderator