Excel VBA : Group items in a ListView

Is it possible (and in that case how would I do it) to group the ListItems in a ListView to mimic the 'Group By' functionality in Windows Explorer to keep specific listitems together ?

I am talking about when in Windows Explorer you can right-click select 'Group By - Type' (or some such) and then you get an out-dented heading for key groups such as 'FIle Folder'
LVL 3
AL_XResearchAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Martin LissOlder than dirtCommented:
Would using a treeview instead work for you?
0
AL_XResearchAuthor Commented:
Not really no. I had thought of that but ultimately i need to display columns as I am using the control to show multiple name-value pairs.

Also I need to be able to change the forecolour of each item as needed
0
Martin LissOlder than dirtCommented:
You could add an additional column with a width of zero and add grouping values to the rows and sort on the additional column.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

AL_XResearchAuthor Commented:
That's true of course (and one of my pondering) but it doesn't show a 'group heading' in a simlar way to grouping items in Windows Explorer does.
0
Martin LissOlder than dirtCommented:
Try the attached.
28710639.xlsm
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AL_XResearchAuthor Commented:
Martin's solution is probably the best that this control I'd capable of
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.