<?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 Re: Macro Problem in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Macro-Problem/m-p/1369680#M827946</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My hint was initiated from the error-message "Typenkonflikt" and the first search hinted on the object-size. Now I looked again and there are further possibilities for such errors if the array contained NULL or the value-lenghts &amp;gt; 255. Again both arrays should be the same when created in the above way - but I'm not sure if VBA and VBS are behaving identically in such cases - maybe one ignored this occurence and the other failed. It's maybe not the next step to do but you could read (and write in excel) the values of your array to see if you hit the max. number of values or of the value-lenghts or NULL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another point could be the call of Application.Transpose which is outdated and might be replaced with something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Application.WorksheetFunction.Transpose(myarray)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See also:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/23315252/vba-tranpose-type-mismatch-error" title="https://stackoverflow.com/questions/23315252/vba-tranpose-type-mismatch-error"&gt;arrays - vba tranpose type mismatch error - Stack Overflow&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://bettersolutions.com/vba/arrays/transposing.htm" title="https://bettersolutions.com/vba/arrays/transposing.htm"&gt;https://bettersolutions.com/vba/arrays/transposing.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;nbsp; Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Jul 2017 11:58:45 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2017-07-13T11:58:45Z</dc:date>
    <item>
      <title>Macro Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Problem/m-p/1369676#M827942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a vba macro with this line:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Range("A1").Resize(UBound(x)) = Application.Transpose(x)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when i run the macro from excel everything works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i try to run the macro from QV module with this adaption:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;objWorkbook.Sheets(1).Range("A1").Resize(UBound(x)) = objExcel .Transpose(x)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;but it throws an error: &lt;STRONG&gt;Typenkonflikt: 'objExcel.Transpose'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inside the Excel i use this code and it works perfectly:&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14998492442799178" jivemacro_uid="_14998492442799178"&gt;
&lt;P&gt;Sub Test()&lt;/P&gt;
&lt;P&gt;Dim IE As Object&lt;/P&gt;
&lt;P&gt;Set IE = CreateObject("InternetExplorer.Application")&lt;/P&gt;
&lt;P&gt;With IE&lt;/P&gt;
&lt;P&gt;.Visible = False&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;.Navigate "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://test.com/" rel="nofollow" target="_blank"&gt;http://test.com&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Do Until .Busy Or .ReadyState = 4: DoEvents: Loop&lt;/P&gt;
&lt;P&gt;Dim i As Integer&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;msgbox("1")&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;x = .document.body.innertext&lt;/P&gt;
&lt;P&gt;x = Replace(x, Chr(10), Chr(13))&lt;/P&gt;
&lt;P&gt;x = Split(x, Chr(13))&lt;/P&gt;
&lt;P&gt;Range("A1").Resize(UBound(x)) = &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Application.Transpose(x)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;.Quit&lt;/P&gt;
&lt;P&gt;End With&lt;/P&gt;
&lt;P&gt;End Sub&lt;/P&gt;



&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this I use in Qlikview Module&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14998488233672712 jive_text_macro" jivemacro_uid="_14998488233672712"&gt;
&lt;P&gt;Sub Test&lt;/P&gt;
&lt;P&gt;Dim x&lt;/P&gt;
&lt;P&gt;Set objExcel = CreateObject("Excel.Application")&lt;/P&gt;
&lt;P&gt;objExcel.Visible = True&lt;/P&gt;
&lt;P&gt;objExcel.DisplayAlerts = True&lt;/P&gt;
&lt;P&gt;Set objWorkbook = objExcel.Workbooks.Open("C:\Users\Admin\........xlsx")&lt;/P&gt;
&lt;P&gt;Set IE = CreateObject("InternetExplorer.Application")&lt;/P&gt;
&lt;P&gt;With IE&lt;/P&gt;
&lt;P&gt;.Visible = False&lt;/P&gt;
&lt;P&gt;.Navigate "&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;&lt;A class="jive-link-external-small" href="http://test.com/" rel="nofollow" target="_blank"&gt;http://test.com&lt;/A&gt;&lt;/SPAN&gt;"&lt;/P&gt;
&lt;P&gt;Do Until .Busy Or .ReadyState = 4: DoEvents: Loop&lt;/P&gt;
&lt;P&gt;msgbox("1")&lt;/P&gt;
&lt;P&gt;x = .document.body.innertext&lt;/P&gt;
&lt;P&gt;x = Replace(x, Chr(10), Chr(13))&lt;/P&gt;
&lt;P&gt;x = Split(x, Chr(13))&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;objWorkbook.Sheets(1).Range("A1").Resize(UBound(x)) = &lt;/STRONG&gt;&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;objExcel&lt;/SPAN&gt;.Transpose(x)&lt;/P&gt;
&lt;P&gt;.Quit&lt;/P&gt;
&lt;P&gt;End With&lt;/P&gt;
&lt;P&gt;objWorkbook.SaveAs "C:\Users\Admin\......xlsx"&lt;/P&gt;
&lt;P&gt;objExcel.Quit&lt;/P&gt;
&lt;P&gt;End Sub&lt;/P&gt;



&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;is anybody able to tell me the äquivalent in QV module&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I have attached the working xlsm file&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;and also the not working qvw&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Problem/m-p/1369676#M827942</guid>
      <dc:creator>Frank_Hartmann</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Problem/m-p/1369677#M827943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;any ideas on this?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jul 2017 10:10:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Problem/m-p/1369677#M827943</guid>
      <dc:creator>Frank_Hartmann</dc:creator>
      <dc:date>2017-07-13T10:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Problem/m-p/1369678#M827944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not yet tested with your examples but could it be that your array is too big for transpose which could be handle max. 65536 values? If yes, you will need another approach with looping through the array and it might be in general not a really slower way, see: &lt;A href="http://www.office-loesung.de/ftopic246261_0_0_asc.php" title="http://www.office-loesung.de/ftopic246261_0_0_asc.php"&gt;Array Transponieren - - - - - - - - - - - - Office-Loesung.de&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jul 2017 11:23:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Problem/m-p/1369678#M827944</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2017-07-13T11:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Problem/m-p/1369679#M827945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcus,&lt;/P&gt;&lt;P&gt;thank you for your response.&lt;/P&gt;&lt;P&gt;But why is the vba solution working with transpose and the vbs solution not?&lt;/P&gt;&lt;P&gt;shouldn´t there be the limitation of &lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;65536 values&lt;/SPAN&gt; for both solutions using&amp;nbsp; transpose?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jul 2017 11:29:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Problem/m-p/1369679#M827945</guid>
      <dc:creator>Frank_Hartmann</dc:creator>
      <dc:date>2017-07-13T11:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Problem/m-p/1369680#M827946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My hint was initiated from the error-message "Typenkonflikt" and the first search hinted on the object-size. Now I looked again and there are further possibilities for such errors if the array contained NULL or the value-lenghts &amp;gt; 255. Again both arrays should be the same when created in the above way - but I'm not sure if VBA and VBS are behaving identically in such cases - maybe one ignored this occurence and the other failed. It's maybe not the next step to do but you could read (and write in excel) the values of your array to see if you hit the max. number of values or of the value-lenghts or NULL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another point could be the call of Application.Transpose which is outdated and might be replaced with something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Application.WorksheetFunction.Transpose(myarray)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See also:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/23315252/vba-tranpose-type-mismatch-error" title="https://stackoverflow.com/questions/23315252/vba-tranpose-type-mismatch-error"&gt;arrays - vba tranpose type mismatch error - Stack Overflow&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://bettersolutions.com/vba/arrays/transposing.htm" title="https://bettersolutions.com/vba/arrays/transposing.htm"&gt;https://bettersolutions.com/vba/arrays/transposing.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;nbsp; Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jul 2017 11:58:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Problem/m-p/1369680#M827946</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2017-07-13T11:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Problem/m-p/1369681#M827947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this is what finally worked for me:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub Test&lt;/P&gt;&lt;P&gt;Dim x&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Dim dteWait&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Set objExcel = CreateObject("Excel.Application")&lt;/P&gt;&lt;P&gt;objExcel.Visible = False&lt;/P&gt;&lt;P&gt;objExcel.DisplayAlerts = True&lt;/P&gt;&lt;P&gt;Set objWorkbook = objExcel.Workbooks.Open("C:\Users\Admin\Desktop\pullData\pullWebsiteAsText.xlsx")&lt;/P&gt;&lt;P&gt;Set IE = CreateObject("InternetExplorer.Application")&lt;/P&gt;&lt;P&gt;With IE&lt;/P&gt;&lt;P&gt;.Visible = True&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;.Navigate "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://cryptoindexes.com/volatility" rel="nofollow" target="_blank"&gt;http://cryptoindexes.com/volatility&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Do Until .Busy Or .ReadyState = 4: DoEvents: Loop&lt;/P&gt;&lt;P&gt;dteWait = DateAdd("s", 10, Now())&lt;/P&gt;&lt;P&gt;Do Until (Now() &amp;gt; dteWait)&lt;/P&gt;&lt;P&gt;Loop&lt;/P&gt;&lt;P&gt;x = .document.body.innertext&lt;/P&gt;&lt;P&gt;x = Replace(x, Chr(10), Chr(13))&lt;/P&gt;&lt;P&gt;Set WshShell = CreateObject("WScript.Shell")&lt;/P&gt;&lt;P&gt;Set oExec = WshShell.Exec("clip")&lt;/P&gt;&lt;P&gt;Set oIn = oExec.stdIn&lt;/P&gt;&lt;P&gt;oIn.WriteLine x&lt;/P&gt;&lt;P&gt;oIn.Close&lt;/P&gt;&lt;P&gt;objExcel.Range("A1").PasteSpecial&lt;/P&gt;&lt;P&gt;End With&lt;/P&gt;&lt;P&gt;objWorkbook.Save&lt;/P&gt;&lt;P&gt;objExcel.Quit&lt;/P&gt;&lt;P&gt;IE.Quit&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jul 2017 16:19:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Problem/m-p/1369681#M827947</guid>
      <dc:creator>Frank_Hartmann</dc:creator>
      <dc:date>2017-07-13T16:19:18Z</dc:date>
    </item>
  </channel>
</rss>

