Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: archiving data

  1. #1
    New Member
    Join Date
    Apr 2002
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    i want to archive data from a database onto a new workbook. How do i save the file as the latest date in the database?? it keeps saving as book 1. HELP!!!

  2. #2
    New Member
    Join Date
    Apr 2002
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    8 people have looked at this in the last little bit of time but no suggestions HHEEEEEELLLLPPPP!!!!!!!!!!

  3. #3
    New Member
    Join Date
    Apr 2002
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Please help, i've got to do my project and hand it in today!!

  4. #4
    New Member
    Join Date
    Apr 2002
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    For the love of god, HELP ME!!!

    it would be most appriciated if you help a poor welshman...

  5. #5
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Sunny, spring-like Hull
    Posts
    3,339
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Your question has been up for less than half an hour, people are less inclined to help if you keep bleating on.

    If your dates are in column A, then try this code inserted into a module in the VBA editor: -

    Public Sub SavebyHighestDate()

    Dim rng As Range
    Dim myDate As String
    Dim myPath As String

    myPath = "C:My Documents"
    Set rng = Sheet1.Range("A:A")

    myDate = Format(WorksheetFunction.Max(rng), "dd-mm-yy")
    MsgBox Format(myDate, "dd-mm-yy")
    ThisWorkbook.SaveAs myPath & myDate

    End Sub

    Change the path, sheet no and column range to suit.

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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