Results 1 to 7 of 7

Creating a calendar drop down box for multiple cells

Threaded View

  1. #1
    Registered User
    Join Date
    12-02-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    51

    Creating a calendar drop down box for multiple cells

    Hi all

    Could somebody please tell me where I am going wrong? I am fairly new at vba. Basically I want to be able to click on a certain cell and have a calendar box pop up and enter the date in that cell. I have a few different ranges as to where I need to populate a date.


    Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
    
        Dim Rng1, Rng2, Rng3, Rng4, Rng5, myMultipleRange As Range
        
        
        Set Rng1 = Range("B2:L2")
        Set Rng2 = Range("B8:L8")
        Set Rng3 = Range("B11:L11")
        Set Rng4 = Range("B16:L16")
        Set Rng5 = Range("B18:L18")
        Set myMultipleRange = Union(Rng1, Rng2, Rng3, Rng4, Rng5)
        
        
        If Intersect(Target, myMultipleRange) Is Nothing Then Exit Sub
        Cancel = True
        UserForm1.Show
    
    End Sub
    Thanks
    Last edited by arlu1201; 12-02-2012 at 08:53 AM.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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