Disabling Row Select from Header

  • Thread starter Thread starter n30l1th1c
  • Start date Start date
N

n30l1th1c

Does anyone know where you can disable row selection via the left-click
on the row header? I have a spreadsheet that will not allow the entire
row to be selected when a left-click is performed in the row header.
The select all button will not respond to a left-click either. I need
to mimic this behavior in another workbook, but I cannot find where, or
how to do that. Thank you in advance for any information on this.
 
Use the selectionchange event

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
if Target.Address = Target.EntireRow.Address then
application.EnableEvents = False
Target(1).Select
application.EnableEvents = True
End if
End Sub

You could use the workbook level equivalent as well.

New to events? See Chip Pearson's page on events

http://www.cpearson.com/excel/events.htm
 

Ask a Question

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.

Ask a Question

Back
Top