• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Simple To Do List Question

gcote

New Member
I am using the simple to do list that was offered as a free download.

I am new to macros and have added a 3rd column to the list so that I can include the date for the task.

How do I revise the macro to include the 3rd column when resorting the list?

Also, how easy would it be to copy done items to another column instead of trashing them altogether, so that I can have a record of my done items.


Thanks for your help.
 
It is at http://chandoo.org/wp/2008/10/01/simple-todo-list-using-excel/
 
Assuming you added a new column B for the dates


Option Explicit


[pre]<br />
Private Sub Worksheet_Change(ByVal Target As Range)<br />
Const WS_RANGE As String = "B6:B1000" '<<<< change to suit</p>
<p> On Error GoTo ws_exit</p>
<p> Application.EnableEvents = False</p>
<p> If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then</p>
<p> Me.Range("B5").Resize(1000, 3).Sort key1:=Me.Range("B6"), key1:=xlAscending, Header:=xlYes</p>
<p> End If</p>
<p>ws_exit:<br />
Application.EnableEvents = True<br />
End Sub<br />
[/pre]


This is worksheet event code, which means that it needs to be

placed in the appropriate worksheet code module, not a standard

code module. To do this, right-click on the sheet tab, select

the View Code option from the menu, and paste the code in.
 
Back
Top