O n c l i c k javascript

Smat90

New Member
Joined
Apr 21, 2016
Messages
2
Ciao a tutti

Ho un problema vorrei scrivere uno script vba per copiare alcuni dati da una tabella in questo sito: http://www.ecb.europa.eu/stats/money/yc/html/index.en

i dati non sono visibili subito ma bisogna selezionare il tag "Yields" in alto a destra rispetto al grafico.
a quel punto appare la tabella da cui vorrei copiare i dati.

il problema principale è che non riesco a azionare il comando O n c l i c k per poi copiare i dati.

questo (penso) dovrebbe essere il comando eseguito
o n c l i c k="javascript:charts[0].switchDimension(1,1);"

e questo il codice scritto da me:


rivate Sub CommandButton1_Click()


Dim termine As String
Dim tasso As String


termine = ""
tasso = ""


the_start:

Set objIE = CreateObject("internetExplorer.Application")
objIE.Top = 0
objIE.Left = 0
objIE.Width = 800
objIE.Height = 600
objIE.Visible = True 'vediamo la finestra
<span")

On Error Resume Next

objIE.navigate ("http://www.ecb.europa.eu/stats/money/yc/html/index.en.html")

'per aspettare che la pagina si carica
Do
DoEvents

If Err.Number <> 0 Then
objIE.Quit
Set objIE = Nothing
GoTo the_start

End If


Loop Until objIE.ReadyState = 4


IE.document.all.item
Call IE.document.parentWindow.execScript("javascript:charts[0].switchDimension(1,1);", "JavaScript")


Grazie a tutti</span")
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Forum statistics

Threads
1,216,071
Messages
6,128,626
Members
449,460
Latest member
jgharbawi

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