Wrox Programmer Forums
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 24th, 2010, 06:57 PM
Registered User
 
Join Date: Mar 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default autosort a list

I've been working on a DDE that will work like a stock ticker and am running into a roadblock. I need the columns to sort continuously as the values within them are updated, but can't figure out how? For example:

Symbol - Yesterday's Close - Last Price - Net Change
F - 13.00 - 13.15 - 0.15
MSFT - 25.00 - 25.25 - 0.25
GE - 16.00 - 16.12 - 0.12

Yesterday's Close and Last Price would update through the DDE interface, and Net Change would be calculated as the difference. I need excel to automatically sort in descending order as the values change, thus making MSFT first on the list. Is this possible?? Any help would be much appreciated.
 
Old March 24th, 2010, 09:59 PM
Friend of Wrox
 
Join Date: Sep 2005
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts
Default

Hi

You can try using the sort routine in Worksheet_Change event of that particular sheet.

This event will get fired whenever there is change in your values

Cheers
Shasur
__________________
C# Code Snippets (http://www.dotnetdud.blogspot.com)

VBA Tips & Tricks (http://www.vbadud.blogspot.com)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Dim list As New List(Of Testclass) dotnetDeveloper General .NET 1 January 6th, 2009 08:19 PM
Dim list As New List(Of Testclass) dotnetDeveloper Visual Basic 2008 Essentials 0 January 6th, 2009 04:04 PM
multi-column list box values moved to 2nd list box sbmvr Access VBA 1 May 14th, 2007 01:58 PM
fill dropdown list with items when parent list isaac_cm Pro PHP 1 July 10th, 2006 05:41 AM
List tablesname from database & list databasename ittorget MySQL 3 September 10th, 2005 03:06 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.