Excel protected sheet BeforeDoubleClick event

Dmitrij Holkin

How to make working this code then sheet is protected? Target Cells are not protected (unchecked in properties)

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
    If Not Intersect(Target, Range("printR")) Is Nothing Then
        Application.EnableEvents = False
        Cancel = True
        Target.ClearContents
        Application.EnableEvents = True
    End If
End Sub
Kdean571

you could try including this somewhere in your code

ActiveSheet.Unprotect Password:="123"

then:

Sheets("sheetName").Protect Password:="123"

Hope this helps :)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Excel: Disable alert about trying to change protected cell on BeforeDoubleClick

From Dev

Excel: Disable alert about trying to change protected cell on BeforeDoubleClick

From Dev

Specifying User Permissions in VBA for Protected Excel Sheet

From Dev

Autofilter a protected excel sheet opened from access

From Dev

Autofilter a protected excel sheet opened from access

From Dev

Excel VBA - sheet being protected too quickly

From Dev

Remove protected view from Excel sheet opened programmatically in Access

From Dev

How to enable Cell re-size on protected Excel Sheet

From Dev

How to disable save and protected sheet prompt in excel using VBA

From Dev

Excel: Find out who password protected a individual sheet on book

From Dev

Add Module code of BeforeDoubleClick_event to dynamically created worksheets

From Dev

vba excel copy only visible cells on key press ctrl+c for protected sheet

From Dev

Is there an alternative to Worksheet_BeforeDoubleClick for touch-enabled excel?

From Dev

VBA editing cells in protected sheet

From Dev

Insert Pivot Table in protected sheet

From Dev

Excel VBA: Worksheet Double-click event won't run when worksheet is protected

From Dev

Apply a protected sheet macro to all sheets in workbook

From Dev

Disable macro buttons when sheet is protected?

From Dev

Can a script edit a protected range or sheet?

From Dev

How can I convert a JavaFX Table data to Apache POI Excel sheet on Button click event?

From Dev

How can I convert a JavaFX Table data to Apache POI Excel sheet on Button click event?

From Dev

C# excel add in - how to directly update sheet UI from event handler on long processing tasks

From Dev

Excel form control macro updates another sheet, Worksheet_Change event does not trigger

From Dev

Ignore Excel Files That Are Password Protected

From Dev

Ignore Excel Files That Are Password Protected

From Dev

How check if Excel worksheet is protected?

From Dev

Dataframe to Excel sheet

From Dev

Read Excel sheet in Powershell

From Dev

Excel Sheet Grouping and Format

Related Related

  1. 1

    Excel: Disable alert about trying to change protected cell on BeforeDoubleClick

  2. 2

    Excel: Disable alert about trying to change protected cell on BeforeDoubleClick

  3. 3

    Specifying User Permissions in VBA for Protected Excel Sheet

  4. 4

    Autofilter a protected excel sheet opened from access

  5. 5

    Autofilter a protected excel sheet opened from access

  6. 6

    Excel VBA - sheet being protected too quickly

  7. 7

    Remove protected view from Excel sheet opened programmatically in Access

  8. 8

    How to enable Cell re-size on protected Excel Sheet

  9. 9

    How to disable save and protected sheet prompt in excel using VBA

  10. 10

    Excel: Find out who password protected a individual sheet on book

  11. 11

    Add Module code of BeforeDoubleClick_event to dynamically created worksheets

  12. 12

    vba excel copy only visible cells on key press ctrl+c for protected sheet

  13. 13

    Is there an alternative to Worksheet_BeforeDoubleClick for touch-enabled excel?

  14. 14

    VBA editing cells in protected sheet

  15. 15

    Insert Pivot Table in protected sheet

  16. 16

    Excel VBA: Worksheet Double-click event won't run when worksheet is protected

  17. 17

    Apply a protected sheet macro to all sheets in workbook

  18. 18

    Disable macro buttons when sheet is protected?

  19. 19

    Can a script edit a protected range or sheet?

  20. 20

    How can I convert a JavaFX Table data to Apache POI Excel sheet on Button click event?

  21. 21

    How can I convert a JavaFX Table data to Apache POI Excel sheet on Button click event?

  22. 22

    C# excel add in - how to directly update sheet UI from event handler on long processing tasks

  23. 23

    Excel form control macro updates another sheet, Worksheet_Change event does not trigger

  24. 24

    Ignore Excel Files That Are Password Protected

  25. 25

    Ignore Excel Files That Are Password Protected

  26. 26

    How check if Excel worksheet is protected?

  27. 27

    Dataframe to Excel sheet

  28. 28

    Read Excel sheet in Powershell

  29. 29

    Excel Sheet Grouping and Format

HotTag

Archive