![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 5
|
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 |
|
New Member
Join Date: Apr 2002
Posts: 5
|
8 people have looked at this in the last little bit of time but no suggestions HHEEEEEELLLLPPPP!!!!!!!!!!
|
|
|
|
|
|
#3 |
|
New Member
Join Date: Apr 2002
Posts: 5
|
Please help, i've got to do my project and hand it in today!!
|
|
|
|
|
|
#4 |
|
New Member
Join Date: Apr 2002
Posts: 5
|
For the love of god, HELP ME!!!
it would be most appriciated if you help a poor welshman... |
|
|
|
|
|
#5 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Sunny, spring-like Hull
Posts: 3,339
|
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. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|