Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi community,
I have some QV code from a demo document and I tried to copy a portion of it to a document on my system. The code is RemoveHTML and it doesn't "turn blue" except for in the parent demo document. Any ideas why this is or what I can do?
Press control M and make a macro with this code:
function RemoveHTML( strText )
Dim RegEx
Set RegEx = New RegExp
RegEx.Pattern = "<[^>]*>"
RegEx.Global = True
RemoveHTML = RegEx.Replace(strText, " ")
End function
Here's an example:
load
RemoveHTML(TextBetween(TextBetween(YahooKeyStatsText, 'Market Cap (intraday)',''),'<td class="yfnc_tabledata1">','</td>')) as [Valuation: Market Cap - RAW],
RemoveHTML(TextBetween(TextBetween(YahooKeyStatsText, 'Enterprise Value',''),'<td class="yfnc_tabledata1">','</td>')) as [Valuation: Enterprise Value - RAW],
What might the document have different to allow this?
Press control M and make a macro with this code:
function RemoveHTML( strText )
Dim RegEx
Set RegEx = New RegExp
RegEx.Pattern = "<[^>]*>"
RegEx.Global = True
RemoveHTML = RegEx.Replace(strText, " ")
End function