View Single Post
 
Old 10-01-2013, 04:37 PM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by mikec View Post
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)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote