• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Trying to add calendar to this page codes gives me error

kalua1231

Member
Ok when i am trying to add this code it keeps giving me error message may someone help me ping point and make me understand why this is not working so that next time i keep it in mind,

The page that i am trying to add it to is called General (Sheet 3), thanks again Chandoo
-------------------------------------------------------------------------------------------------

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'check cells for desired format to trigger the calendarfrm.show routine
'otherwise exit the sub
Dim DateFormats, DF
DateFormats = Array("m/d/yy;@", "m/d/yyyy")
For Each DF In DateFormats
If DF = Target.NumberFormat Then
If CalendarFrm.HelpLabel.Caption <> "" Then
CalendarFrm.Height = 191 + CalendarFrm.HelpLabel.Height
Else: CalendarFrm.Height = 191
CalendarFrm.Show
End If
End If
Next
End Sub
 

Attachments

  • Reset 2.xlsm
    247.5 KB · Views: 3
Back
Top