Hi,
I have created a datebox that pops up whenever I click specific columns. It works well until I share the file (which is required at all times). This is my error:
Run-time error '1004':
Unable to set the Left property of the OLEObject class
And this is my current code:
Public Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Application.Intersect(Range("C2:C32000, M2:M32000, N2:N32000"), Target) Is Nothing Then
Calendar1.Left = Target.Left + Target.Width - Calendar1.Width
Calendar1.Top = Target.Top + Target.Height
Calendar1.Visible = True
Calendar1.Value = Date
ElseIf Calendar1.Visible Then Calendar1.Visible = False
End If
End Sub
I am by no means an advanced excel user and was hoping someone could shed some light as to what needs to be changed.
Thank you
Bookmarks