Results 1 to 3 of 3

Vba - insert popup calendar

Threaded View

  1. #1
    Registered User
    Join Date
    10-19-2009
    Location
    tyne & wear
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    37

    Vba - insert popup calendar

    HI ALL
    trying to insert pop up calendar found this vba works ok in new blank sheet but if I try to enter in to attached sheet come up error
    I am trying to get pop up calendar in cells A8 to A150 & G8 to G150 with out success got excel calendar on ok but found vba on here but cant get it to work any help please need to be entered to every month
    VBA CODE
    Private Sub Calendar1_Click()
        ActiveCell.Value = CDbl(Calendar1.Value)
        ActiveCell.NumberFormat = "dd/mm/yyyy"
        ActiveCell.Select
    End Sub
    
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
        If Target.Cells.Count > 1 Then Exit Sub
        If Not Application.Intersect(Range("A8:A150"), Target) Is Nothing Then
            Calendar1.Left = Target.Left + Target.Width - Calendar1.Width
            Calendar1.Top = Target.Top + Target.Height
            Calendar1.Visible = True
            ' select Today's date in the Calendar
            Calendar1.Value = Date
        ElseIf Calendar1.Visible Then Calendar1.Visible = False
        End If
    End Sub
    Attached Files Attached Files
    Last edited by davesexcel; 12-24-2009 at 05:21 PM. Reason: What happened to the code tags?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1