LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 139
Default Button-Instigated Sort: One More Thing...

Thanks to Chip Pearson's guide (http://cpearson.com/excel/vbe.htm),
I've got some code working where I can create buttons at the top of a
worksheet's columns that allow the user to toggle the sort sequence of the
entire sheet based on that column.

Maybe I've been drinking too much coffee again... or maybe I just don't have
enough to do... but it's occurred to me that it would be nice to have some
visual indication of the sort status/functionality.

Right now I'm just putting an invisible rectangle over the column header cell as
in:
--------------------------------------------------------------------
With myCell
Set myRect = .Parent.Shapes.AddShape(Type:=gExcelShape_Rectangl e,
Top:=.Top, Height:=.Height, Width:=.Width, Left:=.Left)
End With

With myRect
.OnAction = theMacroName
.Fill.Visible = False
.Line.Visible = False
End With
--------------------------------------------------------------------

What I'd really like to have up there is one or more objects that tell
the user that
----------------------------------------------
a) They have sorted on that particular column
b) What sequence the sort is in
----------------------------------------------

From the user's perspective, I picture a little triangle in the lower right of
the column header that becomes visible when the sheet is sorted on that column
and invisible when the sheet is sorted on another column (whose header then
shows *it's* triangle).

Then, to add a little more, I see the triangle pointing down if the column
is sorted ASC and pointing up if the column is sorted DESC.


All I can think of is three objects instead of one on each column:
----------------------------------------
- The existing transparent rectangle that
still fires the click events to invoke the
sort routine
- A triangle (bitmap?) pointing upwards
- A triangle pointing downwards
----------------------------------------

Then the sort routine would somehow make the rectangles visible/invisible
or move them Front/Back as needed to represent the .Sorted state.


I'm wondering if greater minds than mine have been here.

Anybody heard of doing something like this?
--
PeteCresswell
 
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
Is there a template for this sort of thing? LAS New Users to Excel 2 November 27th 11 10:29 PM
Sort Button John Gregory Excel Discussion (Misc queries) 2 June 25th 08 08:27 PM
Lookup sort of thing! Paul Excel Worksheet Functions 2 June 23rd 06 03:41 PM
sort button,macro, or ? tiffky Excel Programming 3 August 28th 05 06:44 PM
Add Sort button Mike Excel Programming 2 December 17th 03 12:42 AM


All times are GMT +1. The time now is 09:04 AM.

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"