VBA Query multiple links currency

StuartWhi

Board Regular
Joined
Sep 1, 2011
Messages
75
Hi Guys,

I though I had this one solved after reading other posts but,,, I hope you can help.

I have multiple cells with different currencies which are queries to this Google currency URL.
https://www.google.com/finance/converter?a=1&from=SGD&to=IDR&meta=ei%3D0qLMVfnjJYGZuATQw6rgBA
- changing the IDR to USD etc in differnct cells from AA4 down to AAx

I'm using this code to check for

Code:
Sub UpdateCurrency()
Dim WorkSt As Worksheet, QueryTa As QueryTable


'Set's the Lookups tab to unprotected mode
    Call UnProtectSheet


'Selects the lookups tab, refreshes web querys to get latest currencies
    Sheets("Lookups").Select
    For Each QueryTa In Sheets("Lookups").QueryTables
        QueryTa.Refresh BackgroundQuery:=False
    Next QueryTa
    Set QueryTa = Nothing


'Places current date in cell AA3
    With Range("AA3")
    .Value = Date
    .NumberFormat = "dd-mmm-yyyy"
    End With


    Sheets("Auto Import").Select
    Call ProtectSheet


End Sub

When stepping through though it updates one cell but doesn't continue.

Any ideas.

Thanks,

Stuart.
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Hi All,

Sorry after half a day thinking it was the VBA code above it was actually a bad (corrupted) query table link within the sheet. I manually deleted all the links then restarted again.
Please use the code above if relative to your requirements (unless someone offers a better solution).

Stuart
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top