reniantony
New Member
- Joined
- May 24, 2017
- Messages
- 8
Hello Excel Experts! Need your help on a simple automation program.
There is a website where it has some data and I need to put it into a variable and get it displayed. In more detail, my program accesses the NSE website to the stock name, and I need the % DQTQ value to be fetched into the variable and displayed on the screen.
The code seems to run well, but the problem is that the DQTQ value is never captured, its always blank. I've mentioned the code and the snapshot of the ID below.
The code is as follows:
=============================
Sub dqtq()
Dim driver As New WebDriver
Dim stockname As String
Dim dqtq As String
Dim dqtq1 As String
stockname = InputBox("Please enter Stockname", "Input stockname")
driver.Wait (500)
driver.Start "chrome"
'driver.Window.Minimize
driver.Wait (1000)
driver.Get "https://www.nseindia.com/get-quotes/equity?symbol=" & stockname
driver.Wait (1000)
dqtq = driver.FindElementById("securityWiseDQTQ").Value
driver.FindElementById("securityWiseDQTQ").ScrollIntoView
MsgBox "DQTQ is " & dqtq
End Sub
=============================
There is a website where it has some data and I need to put it into a variable and get it displayed. In more detail, my program accesses the NSE website to the stock name, and I need the % DQTQ value to be fetched into the variable and displayed on the screen.
The code seems to run well, but the problem is that the DQTQ value is never captured, its always blank. I've mentioned the code and the snapshot of the ID below.
The code is as follows:
=============================
Sub dqtq()
Dim driver As New WebDriver
Dim stockname As String
Dim dqtq As String
Dim dqtq1 As String
stockname = InputBox("Please enter Stockname", "Input stockname")
driver.Wait (500)
driver.Start "chrome"
'driver.Window.Minimize
driver.Wait (1000)
driver.Get "https://www.nseindia.com/get-quotes/equity?symbol=" & stockname
driver.Wait (1000)
dqtq = driver.FindElementById("securityWiseDQTQ").Value
driver.FindElementById("securityWiseDQTQ").ScrollIntoView
MsgBox "DQTQ is " & dqtq
End Sub
=============================