Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
To protect the contents of the 2 first rows of an excel sheet, so that
the user cannot change them, I wrote the following code: Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Row <= 2 Then Cells(3, 1).Select End Sub When the user selects a cell or a range which overlaps one of the first two rows the cell A3 is selected and thus the user cannot change the contents of the first two rows, I thought :o( Even with this code the user can change the contents by a double-click on the header of row 1 or 2 or on a column header. The code I wrote for this was build up of more than one line in the beginning, so I thought that a double-click was fast enough to be interpreted between two lines of the code, but even with this single line it doesn't work. I also tried to add Application.Interactive = False but it doesn't change anything. All suggestions are welcome! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Defining user access (via user id) using macros | Excel Discussion (Misc queries) | |||
Protection password iin VBA, how to avoid user seeing it? | Excel Discussion (Misc queries) | |||
Avoid user having to enter hours when using [mm]:ss format | Excel Discussion (Misc queries) | |||
Avoid user having to enter 00 hours when using [mm]:ss format | Excel Discussion (Misc queries) | |||
How to Avoid Printing Blank Rows | Excel Programming |