Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Paul
Right-click the Xl icon to the left of 'File' on your menus and paste the following code into the ThisWorkbook module: Private Sub Workbook_BeforeClose(Cancel As Boolean) Me.Sheets("Sheet1").Range("A1").CurrentRegion. _ Sort Key1:=Range("B2"), _ Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, _ Orientation:=xlTopToBottom End Sub Sub workbook_open() Dim LCell As Range Dim i As Long Set LCell = Me.Sheets("Sheet1"). _ Cells(Cells.Rows.Count, 2).End(xlUp) For i = 2 To LCell.Row If Cells(i, 2).Value < Date Then Cells(i, 2).EntireRow.Interior.ColorIndex = 3 Else Exit For End If Next i End Sub "pauluk " wrote in message ... Ok this is what i would like to do, if any kind person could help: I have i sheet with a description and a date which will be added to when someone close the sheet i want the infor to be sorted by date order column b Also i want the sheet to check the date in column b with the computer date. if the date has past then that row is highlighted red. i.e. the date the request was maded 26/05/04 Wed the sheet is opend today 01/06/04 then that row would be cloured red. Thanks in advanced --- Message posted from http://www.ExcelForum.com/ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
find free sharware to include calendar pop or use calendar in cell | Excel Discussion (Misc queries) | |||
how do i export excel calendar info to outlook calendar? | Excel Discussion (Misc queries) | |||
excel calendar - list of names displayed on calendar | Excel Worksheet Functions | |||
Outlook 2002 calendar dates exported to Excel 2002 sort incorrectl | Excel Worksheet Functions | |||
import calendar items from excel into outlook calendar | Excel Discussion (Misc queries) |