ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Disabling Row Select from Header (https://www.excelbanter.com/excel-programming/322937-disabling-row-select-header.html)

n30l1th1c

Disabling Row Select from Header
 
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.


Tom Ogilvy

Disabling Row Select from Header
 
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

--
Regards,
Tom Ogilvy


"n30l1th1c" wrote in message
oups.com...
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.





All times are GMT +1. The time now is 05:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com