View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Automatic Exchange Rates

Copy/paste this code to a general module in the workbook.

Sub refresh_rates()
Selection.QueryTable.Refresh BackgroundQuery:=False
End Sub

If not familiar with VBA and macros, see David McRitchie's site for more on
"getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + r to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Bring down the Forms Toolbar and select the Button tool.

Draw a button on your sheet.

Right-click and "Assign macro"

Assign the above to that button.

I don't know why there is no Euro to USD

You could search the 'net for a website with that info then create a New Query
from that site.


Gord

On 18 Dec 2006 12:41:06 -0800, "Why Tea" wrote:


Gord Dibben wrote:
First of all you can go to DataImport External DataImport Date

Select the MS MoneyCentral Investor Rates.iqy

Dump to a new worksheet.

DataRefresh whenever you like.


Hi Gord, thanks a lot for the answer. It's amazingly easy if you know
how.

I have two more question:
1) Can I put a refresh button in the worksheet?
2) Why isn't Euros-US exchange rate in the table?

/Why Tea