• select a date

    • This topic has 2 replies, 2 voices, and was last updated 24 years ago.
    Author
    Topic
    #355854

    Hi,
    I have a spreadsheet (o2k), with column A filled with consecutive dates which will enable users to enter a particular activity in column B they have completed on the day they did it. It is a rolling 6 month activity to remain qualified, and I would like to have the sheet open on the current day; ie today(); to make life easier.The date format is in the form: 08-Jan-01.

    Any thoughts anyone??

    Thankyou.

    Viewing 0 reply threads
    Author
    Replies
    • #525686

      Something similar was discussed at This Post so you might like to check it out.

      If your dates are consecutive, and there are no missing dates, then the following might be useful,

      Private Sub Worksheet_Activate()
      Dim StartDay As Date
      Dim NoDays As Integer
      StartDay = Range(“A1”).Value
      NoDays = Int(Now()) – StartDay
      Range(“A1”).Offset(NoDays, 0).Select
      End Sub

      Copy the above, right click on the sheet tab you want to use, select View Code, and paste in the main window. Then whenever that sheet is activated it should goto the cell containing the current date. This code assumes the first date is in A1 and consecutive dates are all in column A

      Andrew C

      • #525767

        Andrew,
        That works just the way I wanted. Thank you very much. I never even came close with my attempts!

        The only snagette, which took a few minutes to figure out, was that I only had one sheet and so the event would not work on opening, although it was perfect with a press of F5. I now have two sheets in the workbook:-))). Perfect!

        Once again, thank you.
        Regards,
        Farside

    Viewing 0 reply threads
    Reply To: select a date

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: