![]() |
![]() |
|
|||||||
| 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: 25
|
Two quick questions...
A) A file I am opening updates everyday at noon & the end of the filename is the day of the month it was updated. April 26th Filename = test26 I have no problems if the user runs my macro on the 26th because it inserts the day. The problem I am having is if the user runs the macro in the morning of the 27th. 27 inserts at the end of the filename, rather than the 26 that I need. How would I code this since I want the day to equal the 26th if it is After 12pm EST on the 26th and before 12pm EST on the 27th. B) Is there a way to determine which Excel version the user is running? Users of my programs are running anywhere from version 97 through XP. Thanks, Derek_35 |
|
|
|
|
|
#2 |
|
New Member
Join Date: Apr 2002
Posts: 25
|
BUTT
|
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
|
For your second question,
test Application.Version to determine the Excel app running. I don't know all the codes, but 8.0 -- Excel 97 9.0 -- Excel 2000 10.0 -- Excel XP Use Val(Application.Version) because there are different releases that get different version numbers. On my system, Msgbox Application.Version returned 8.0j HTH, Jay |
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Millbank, London, UK
Posts: 1,790
|
Derek,
adding to Jay's VBA method, the formula approach would be : =INFO("release") will will return the "Version of Microsoft Excel, as text."
__________________
:: Pharma Z - Family drugstore :: |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|