Quote:
Originally Posted by mikec
I have attached POY REV 14b.xlsm. The code under discussion is in the Diaries form. It is fired by the Save command on the first page of the form. A call to Private Sub SortCompetition from the save command code prompts the sort of the table. This sub is in General section of the form code. Immediately below are subs I have renamed as SortCompetition1 and Sort Competitions. The former has the Key definition that does not run. The latter is the original code. As general background I am going through this project with the intention of removing direct cell references and range selection wherever I can. Why? Well it's fun!
Thank you for your interest - this one is driving me crazy
|
Hi Mike,
The answer is quite simple:
.ListColumns(1) returns the string 'Date', not its cell range.
What you need is something like:
.ListColumns(1).Range.Cells(1, 1)