excelaudio
New Member
- Joined
- Nov 4, 2015
- Messages
- 8
https://www.cms.gov/medicare-coverage-database/search/advanced-search.aspx
Hello all,
I'm trying to automate going to the above site for a simple search feature in Excel and the name of the search bar comes back with a really long name. Is the name truly as long as it states or am I missing something? I have attached my VBA code as well so I an get his macro moving forward.
Hello all,
I'm trying to automate going to the above site for a simple search feature in Excel and the name of the search bar comes back with a really long name. Is the name truly as long as it states or am I missing something? I have attached my VBA code as well so I an get his macro moving forward.
Code:
Sub Test()
Dim appIE As Object
'Set appIE = Nothing
Dim objElement As Object
Dim objCollection As Object
Set appIE = CreateObject("InternetExplorer.Application")
sURL = "[URL]https://www.cms.gov/medicare-coverage-database/search/advanced-search.aspx[/URL]"
With appIE
.Navigate sURL
.Visible = True
End With
Do While appIE.Busy 'Or appIE.ReadyState <> 4
DoEvents
Loop
Set objCollection = appIE.Document.getElementsByTagName("[LEFT][COLOR=#222222][FONT=Consolas]ctl00_ctl00_ctl00_CMSGMainContentPlaceHolder_ToolContentPlaceHolder_MCDContentPlaceHolder_pnlSearchByID[/FONT][/COLOR][/LEFT]")
Set appIE = Nothing
End Sub