LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Date to close file


I'm using the date code below to close the file but just figured that if
the file is renamed this will fail. Is there code that will close the
workbook no matter what the filename to overcome this ?


Dim exdate As Date
exdate = "07/12/2009"
If Date exdate Then
MsgBox ("Sorry this spreadsheet has expired please use latest
version")
Application.DisplayAlerts = False
Workbooks("Master 09 17.50 VAT.XLS").Close
Exit Sub
End If




--
PSM
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
vlookup on close file Dan Excel Worksheet Functions 2 June 3rd 08 03:47 PM
Why do i lose EOMONTH on file close Jake Excel Worksheet Functions 2 May 30th 08 06:00 PM
Everytime i close an excel file, it creates a new backup file p Excel Discussion (Misc queries) 3 November 22nd 07 08:13 AM
Copy from another file and close automatically Jim G Excel Discussion (Misc queries) 2 October 17th 07 01:31 AM
File close excel does not ask me to save changes Cathy Humphreys Excel Discussion (Misc queries) 2 June 13th 05 08:48 PM


All times are GMT +1. The time now is 11:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"