<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic call VBscript function/procedure from loading script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/call-VBscript-function-procedure-from-loading-script/m-p/662090#M672115</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I wrote vbscript macro that export data to excel.&lt;/P&gt;&lt;P&gt;When running the macro from the "edit module" screen (by clicking on the "Test" button") it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to call my function from the loading script.&lt;/P&gt;&lt;P&gt;I tried to write the macro as a procedure (with SUB, END SUB) and call from script with "CALL" - but it throws "script line error" message.&lt;/P&gt;&lt;P&gt;I tried to write the macro as a function (with Function, END Function) and call from script with SET var = MyFunc() or with LOAD MyFunc(), but no data was exported.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How should I call my macro? Does there is any security issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I read all discussions about this issue and tried to do everything but it still doesn't work... &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone please advise? thanks!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Aug 2014 13:35:56 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-08-27T13:35:56Z</dc:date>
    <item>
      <title>call VBscript function/procedure from loading script</title>
      <link>https://community.qlik.com/t5/QlikView/call-VBscript-function-procedure-from-loading-script/m-p/662090#M672115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I wrote vbscript macro that export data to excel.&lt;/P&gt;&lt;P&gt;When running the macro from the "edit module" screen (by clicking on the "Test" button") it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to call my function from the loading script.&lt;/P&gt;&lt;P&gt;I tried to write the macro as a procedure (with SUB, END SUB) and call from script with "CALL" - but it throws "script line error" message.&lt;/P&gt;&lt;P&gt;I tried to write the macro as a function (with Function, END Function) and call from script with SET var = MyFunc() or with LOAD MyFunc(), but no data was exported.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How should I call my macro? Does there is any security issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I read all discussions about this issue and tried to do everything but it still doesn't work... &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone please advise? thanks!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 13:35:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/call-VBscript-function-procedure-from-loading-script/m-p/662090#M672115</guid>
      <dc:creator />
      <dc:date>2014-08-27T13:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: call VBscript function/procedure from loading script</title>
      <link>https://community.qlik.com/t5/QlikView/call-VBscript-function-procedure-from-loading-script/m-p/662091#M672116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;have you tried with button and trigger,&lt;/P&gt;&lt;P&gt;create a button and add action on button, "run a macro" an see if it works...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 13:42:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/call-VBscript-function-procedure-from-loading-script/m-p/662091#M672116</guid>
      <dc:creator>israrkhan</dc:creator>
      <dc:date>2014-08-27T13:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: call VBscript function/procedure from loading script</title>
      <link>https://community.qlik.com/t5/QlikView/call-VBscript-function-procedure-from-loading-script/m-p/662092#M672118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;During the load it didn't exist the ActiveDocument and all methods which needs this basic-point will fail. Instead you could use a PostReload-Trigger.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 13:42:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/call-VBscript-function-procedure-from-loading-script/m-p/662092#M672118</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2014-08-27T13:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: call VBscript function/procedure from loading script</title>
      <link>https://community.qlik.com/t5/QlikView/call-VBscript-function-procedure-from-loading-script/m-p/662093#M672119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your function method should work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 13:44:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/call-VBscript-function-procedure-from-loading-script/m-p/662093#M672119</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2014-08-27T13:44:25Z</dc:date>
    </item>
    <item>
      <title>Re: call VBscript function/procedure from loading script</title>
      <link>https://community.qlik.com/t5/QlikView/call-VBscript-function-procedure-from-loading-script/m-p/662094#M672121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/message/593969"&gt;Fuzzy Matching/Joining&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 13:46:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/call-VBscript-function-procedure-from-loading-script/m-p/662094#M672121</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2014-08-27T13:46:08Z</dc:date>
    </item>
    <item>
      <title>Re: call VBscript function/procedure from loading script</title>
      <link>https://community.qlik.com/t5/QlikView/call-VBscript-function-procedure-from-loading-script/m-p/662095#M672122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;OL class="dp-c" start="1" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;LI&gt;&lt;SPAN style="font-style: inherit; font-weight: inherit;"&gt;QUALIFY *;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;Table1:&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;LOAD *, RecNo() as RecNo INLINE [&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MARK1, MARK2&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CH: WV2ZZZ7HZ9H119390, ENGINE NO: AXB179634&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CH: WV2ZZZ7HZ9H119548, ENGINE NO: AXB179429&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CHASSIS NO:SHSRE77508U101822, ENG NO:K2424-1019151&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CH: KL1PM5E51AK528096, ENG: F18D4009613KA&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CH: WV2ZZZ7HZ9H100620, ENG NO: AXB178969&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CH: AHTLT58E406009706, ENG: 1NR0178419&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CH: AHTLT58E206008912, ENG: 1NR0162953&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CH: AHTLT58E606008833, ENG: 1NR0162819&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;];&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;Table2:&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;LOAD *, RecNo() as RecNo INLINE [&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MARK1, MARK2&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CHASS# WV2ZZZ7HZ9H119390, E# AXB179634&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; C# WV2ZZZ7HZ9H119548, ENG NO: AXB179429&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CH: AHTLT58E206008912, ENG: 1NR0162953&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CH: KL1PM5E51AK528096, ENG: F18D4009613KA&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CHS# WV2ZZZ7HZ9H100620, ENG#: AXB178969&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CH: AHTLT58E406009706, ENG: 1NR0178419&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; VIN NO:SHSRE77508U101822, ENG:K2424-1019151&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CH: AHTLT58E606008833, ENG: 1NR0162819&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;];&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;UNQUALIFY *;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;NoConcatenate&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;tabLinks:&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;LOAD * Resident Table1;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;Join (tabLinks)&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;LOAD * Resident Table2;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;Left Join (tabLinks)&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;LOAD Table1.RecNo,&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Table2.RecNo,&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; levenshtein(Table1.MARK1,Table2.MARK1) as LevDistMARK1,&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; levenshtein(Table1.MARK2,Table2.MARK2) as LevDistMARK2&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;Resident tabLinks;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;DROP Fields Table1.MARK1, Table2.MARK1, Table1.MARK2, Table2.MARK2 From tabLinks;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 17px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;using this module / vbs-function:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="bar" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;/P&gt;&lt;DIV style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;P&gt;&lt;/P&gt;&lt;OL class="dp-c" start="1" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;LI&gt;&lt;SPAN style="font-style: inherit; font-weight: inherit;"&gt;'********************************************************************************************************&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;'*&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;'*&amp;nbsp; VBScript function implementing Levenshtein-Distance-algorithm&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&lt;SPAN&gt;'*&amp;nbsp; source: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Levenshtein_distance#VBScript"&gt;http://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Levenshtein_distance#VBScript&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;'*&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;'********************************************************************************************************&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;Function levenshtein( a, b )&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; Dim i,j,cost,d,min1,min2,min3&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt; ' Avoid calculations where there there are empty words&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; If Len( a ) = 0 Then levenshtein = Len( b &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; Exit Function&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; If Len( b ) = 0 Then levenshtein = Len( a &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; Exit Function&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt; ' Array initialization&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; ReDim d( Len( a ), Len( b ) )&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; For i = 0 To Len( a &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; d( i, 0 ) = i: Next&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; For j = 0 To Len( b &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; d( 0, j ) = j: Next&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt; ' Actual calculation&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; For i = 1 To Len( a )&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; For j = 1 To Len( b )&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Mid(a, i, 1) = Mid(b, j, 1) Then cost = 0 Else cost = 1 End If&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; ' Since min() function is not a part of VBScript, we'll "emulate" it below&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; min1 = ( d( i - 1, j ) + 1 )&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; min2 = ( d( i, j - 1 ) + 1 )&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; min3 = ( d( i - 1, j - 1 ) + cost )&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; If min1 &amp;lt;= min2 And min1 &amp;lt;= min3 Then&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; d( i, j ) = min1&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; ElseIf min2 &amp;lt;= min1 And min2 &amp;lt;= min3 Then&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; d( i, j ) = min2&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; Else&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; d( i, j ) = min3&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; End If&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; Next&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; Next&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; levenshtein = d( Len( a ), Len( b ) )&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;End Function&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 17px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 17px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 17px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 13:48:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/call-VBscript-function-procedure-from-loading-script/m-p/662095#M672122</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2014-08-27T13:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: call VBscript function/procedure from loading script</title>
      <link>https://community.qlik.com/t5/QlikView/call-VBscript-function-procedure-from-loading-script/m-p/662096#M672123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this there is an example in this link&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/docs/DOC-4643" style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3778c7; background-color: #f8fbfe;"&gt;Calling VB function (macro) in Load script to find common string length in two strings&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 14:06:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/call-VBscript-function-procedure-from-loading-script/m-p/662096#M672123</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2014-08-27T14:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: call VBscript function/procedure from loading script</title>
      <link>https://community.qlik.com/t5/QlikView/call-VBscript-function-procedure-from-loading-script/m-p/662097#M672124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all for your help!!!! I used &lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A href="https://community.qlik.com/people/Marcus_Sommer"&gt;Marcus_Sommer&lt;/A&gt;&lt;/STRONG&gt; suggestion (&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;PostReload-Trigger) and it's working!&lt;/SPAN&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 14:20:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/call-VBscript-function-procedure-from-loading-script/m-p/662097#M672124</guid>
      <dc:creator />
      <dc:date>2014-08-27T14:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: call VBscript function/procedure from loading script</title>
      <link>https://community.qlik.com/t5/QlikView/call-VBscript-function-procedure-from-loading-script/m-p/662098#M672125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;please mark your thread as answered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 15:12:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/call-VBscript-function-procedure-from-loading-script/m-p/662098#M672125</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2014-08-27T15:12:01Z</dc:date>
    </item>
  </channel>
</rss>

