Created
July 22, 2019 14:57
-
-
Save Atreyagaurav/0fb1b576cc5188d1834f7ab830647bb8 to your computer and use it in GitHub Desktop.
VBA code to find meaning of the phrase/word in active cell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Sub SeekMeaning() | |
Dim appIE As Object | |
Set appIE = CreateObject("internetexplorer.application") | |
On Error GoTo en | |
Dim seStr As String | |
seStr = Replace(ActiveCell.Value, " ", "-") | |
With appIE | |
.Navigate "https://www.dictionary.com/browse/" + seStr | |
.Visible = False | |
End With | |
Do While appIE.Busy | |
DoEvents | |
Loop | |
Set allrowofdata = appIE.document.getelementsbyclassname("one-click-content css-0 e1w1pzze1") | |
Dim i As Integer | |
i = 1 | |
For Each dat In allrowofdata | |
MsgBox dat.innerText, vbOKOnly, "Meaning " + CStr(i) | |
i = i + 1 | |
Next | |
en: | |
appIE.Quit | |
Set appIE = Nothing | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment