Not solved at all in fact.
When i do as above, i can use the black +. However, as soon as i use the calendar, my original problem resurfaces. There must be something in the Calendar Macro causing the problem.
How do i change the protection command with in the macros to allow you ability to edit objects?
I assume that when the macro turns protection back it, it resets and you can no longer edit objects, that is what appears to be happening.
This is what i have at present
Option Explicit
Option Compare Text
Private Sub Calendar1_Click()
ActiveSheet.Unprotect "secret"
With ActiveCell
.Value = CDbl(Calendar1.Value)
.NumberFormat = "dd/mm/yyyy"
.Select
End With
Calendar1.Visible = False
ActiveSheet.Protect "secret"
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Range("k7:k606"), Target) Is Nothing Then
If Target.Value = "Yes" Then
ActiveSheet.Unprotect "secret"
Call ExtractToSheets
Call TestLock
ActiveSheet.Protect "secret"
End If
End If
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Application.Intersect(Range("i7:i606"), Target) Is Nothing Then
ActiveSheet.Unprotect "secret"
With Calendar1
.Left = Target.Left + Target.Width - Calendar1.Width
.Top = Target.Top + Target.Height
.Visible = True
' select Today's date in the Calendar
.Value = Date
End With
ElseIf Calendar1.Visible Then Calendar1.Visible = False
ActiveSheet.Protect "secret"
End If
End Sub
Bookmarks