A tricky question on VBA Please see pictures for your accurate view of the problem
If you type on Google "SEC EDGAR" , and you enter BDX in the Company Search field
click Search and then in the search results you click the first Document button
and you choose 10-K you get to the filing Detail. From there if we choose XBRL INSTANCE DOCUMENT
. Finally inside the XML document in the elements
as you can see in the last picture we have the element and it's name.
Is there anyway to pull this thing by using VBA and put it in the Excel cell of our preference? I am a beginner in VBA so please be kind to also explain the code a little more and also what References are we adding from Tools in VBE and why.
What i actually am looking for is a code block which grabs the data between the XML elements (**Important: The XML Instance document should be in the Web location provided.) **For example in <Current>
5 </Current)>
something that will pull the 5 and populate a cell designated in the code block and some instructions so i can hold on to it and study the code****
THIS QUESTION IS ANSWERED. IN ORDER FOR THE CODE IN THE ANSWER TO WORK YOU MUST HAVE TURNED ON THE Microsoft XML, V6.0 on the VBE's Tools-->References