Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Generalising sort routine

Hi,

I wrote a routine to sort 2-dimensional integer arrays, but I would
like to extend it to sort any data. If I would use another programming
language I would add the "Compare" function and "Exchange" routine as
parameters, so the interface would be someting like:
Sub Sort( ObjectsToSort() , LowBound, HighBound, CompareFunc,
ExchangeSub).
Unfortunately passing functions/subs as parameters does not seem to be
possible in VBA.
Anyone has an idea how to accomplish this?

I was thinking of creating classes with each their own Sort method, but
have no idea how to do this in VBA. Any info on the net about how to
create classes/objects in VBA?

Greetz,

Lex

Reply
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
Sort Routine Platinum girl[_2_] Excel Discussion (Misc queries) 0 March 9th 07 03:21 PM
sort and tally routine alvin Excel Programming 3 October 4th 05 01:50 PM
Generalising Deleting Rows after AUTOFILTER jason Excel Programming 3 November 5th 04 02:17 PM
Sort Routine VBA weeper Excel Programming 2 September 29th 04 02:59 PM
Need a Special Sort Routine weeper Excel Programming 0 September 28th 04 07:49 PM


All times are GMT +1. The time now is 06:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"