Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Jun 2011
    Posts
    188
    Thanks
    62
    Thanked 0 Times in 0 Posts

    Open attachements based on start date end date

    Dear Gurus,

    I need calendar control in first column start dates and second column end date (end date fixed by user) third column The names ,fourth column PDF files extensions and fifth videos extention.


    I have many PDF files and videos in one folder in folder the file names and video names contains date and name. What I want When I click to The name and select start date and click to 4th column it open for me the same date pdf and for video when I click to 5th column selecting dates open for me video.

    For column third last pdf or video file of datetime stamp appears by selecting the Name ?

    hope I ask well...

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts
    There is a date picker you can use in XL2010 (http://www.fontstuff.com/excel/exltut03.htm) or Walkenbach as some for XL2003-2010 and one for XL2013 (http://www.rondebruin.nl/win/addins/datepicker.htm).

    To link to a file you could use the HYPERLINK function, based on the path and name created by the row. The exact formula will depend on your setup and the format of the date in the name. Could you provide an example file with the pathnames?

    Steve

  3. #3
    2 Star Lounger
    Join Date
    Jun 2011
    Posts
    188
    Thanks
    62
    Thanked 0 Times in 0 Posts
    Sir,
    Please find attached the sample excel file please.
    Attached Files Attached Files

  4. #4
    Gold Lounger Maudibe's Avatar
    Join Date
    Aug 2010
    Location
    Pa, USA
    Posts
    2,629
    Thanks
    114
    Thanked 645 Times in 589 Posts
    Farrukh

    The following code shows how open a calendar when you click in columns 2 to 3. When you select the date, it will place it in the active cell. Modify the code to suit your needs

    DTPicker.png

    Sheet1 Module:
    Code:
    Dim rng As Range
    
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
     If Target.Cells.Count > 1 Then Exit Sub
        If Not Intersect(Target, ActiveSheet.Columns(2)) Is Nothing Or _
            Not Intersect(Target, ActiveSheet.Columns(3)) Is Nothing Then
            Set rng = Target
            Calendar.Show
        Else:
            Calendar.Hide
        End If
    End Sub
    Calendar Form:
    Code:
    Private Sub DTPicker1_Change()
        ActiveCell.Value = DTPicker1.Value
        Calendar.Hide
    End Sub
    HTH,
    Maud
    Attached Files Attached Files
    Last edited by Maudibe; 2014-03-17 at 22:53. Reason: added code

Posting Permissions

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