This procedure let's you click on a cell in a range (defined in the code)
and places a "X" in that cell.
Bob Phillips, Dave Peterson
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim myHeight As Double
Application.EnableEvents = False
On Error GoTo sub_exit
If Not Intersect(Target, Range("A1:A100")) Is Nothing Then
With Target
If .Value = "r" Then
.Value = ""
Else
myHeight = .EntireRow.RowHeight
.Value = "r"
.Font.Name = "Marlett"
.EntireRow.RowHeight = myHeight
End If
End With
End If
sub_exit:
Application.EnableEvents = True
End Sub
This is sheet code.
Right click the sheet tab and paste into the window that opens.
If you click a cell in the range A1:100 a "X" will be placed in that cell.
If you select that cell again the "X" will be removed.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.