how to code for automatically sorting ?

  • Thread starter Thread starter Mebane Faber
  • Start date Start date
M

Mebane Faber

i would like for my Excel spreadsheet to auto sort by column D in a
declining fashion. my worksheet has dde links that import stockprices,
and i want to sort them automatically as they change throughout the day
without my intervention, or having to click on the worksheet or
ctrl+something...i understand that i will need to write some code in VB
or a macro...

can anyone help me with the code for the autosort?

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Answer lifted from the internet

Event driven programming is not possible, all calls are synchronou
with a timeout. The VB program cannot continue processing whils
waiting for a reply from the server, it must wait until the serve
responds or the timeout expires. (Data sent on hot and warm links i
not sent in response to an individual request.)

Web pages often contain information that is perfect for analysis i
Excel. For example, you can use Excel to analyze stock prices copie
directly from a Web page. But what if you need to replace th
information often to keep it current? The refreshable Web queries no
available in Excel version 2002 make that task easy.

To create a new, refreshable Web query:

In your browser, browse to the Web page from which you want to quer
data (such as stock quotes on MSN MoneyCentral).
Copy the data and paste it into an Excel worksheet. A Paste Option
smart tag will appear just below your pasted data.
Click the arrow on the right side of the Paste Options smart tag, an
click Create Refreshable Web Query.
In the New Web Query dialog box, click the yellow arrow next to tabl
of data you want in your Web query.
Click Import.
To have your data refreshed automatically when the file is opened, a
timed intervals, or in the background:

Click Data Range Properties on the External Data toolbar.
Then select the check boxes for the options you want under Refres
control
 
i already have the data updating in real time - the problem is i need a
macro to SORT the data in real time without me refreshing the excel
worksheet....



*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Back
Top