LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 267
Default renaming worksheets by date value

Hi
Am using an open event to calculate if a date on a page has passed if so it
coppies the page to another workbook for archiving.

I want to change the name of the worksheet copied to the date that has
passed (a date value contained within a cell. The date value is formatted to
2-feb-2009 but it still returns error message on this!

any ideas??





Private Sub Workbook_Open()
If Worksheets("sheet3").Range("k4").Value
Worksheets("sheet3").Range("k9").Value Then


Workbooks.Open Filename:="AOT Weekend Duties Record.XLS"
Workbooks("weekend duties2").Worksheets("Sheet2").Copy
after:=Workbooks("AOT Weekend Duties Record.xls").Worksheets("Sheet1")
Workbooks("AOT Weekend Duties Record.xls").Worksheets("sheet2").Name
= Workbooks("weekend duties2").Worksheets("sheet3").Range("k9").Value
Workbooks("AOT Weekend Duties Record.xls").Close
Worksheets("sheet3").Range("k9").Value =
Worksheets("sheet3").Range("k8").Value

End If
End Sub
 
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
Renaming worksheets Teeny Excel Discussion (Misc queries) 8 August 18th 09 10:21 PM
RENAMING WORKSHEETS LEOPARDSHIDEAWAY Excel Worksheet Functions 1 July 26th 07 10:27 PM
Renaming worksheets Mike Allen Excel Discussion (Misc queries) 8 January 21st 07 02:15 AM
Batch renaming of worksheets Lumen S Excel Discussion (Misc queries) 1 August 17th 06 08:35 PM
Renaming Worksheets Steve Walford Excel Worksheet Functions 3 April 1st 05 09:29 PM


All times are GMT +1. The time now is 10:21 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"