<?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 Copy Excel sheet (VB Macro) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Copy-Excel-sheet-VB-Macro/m-p/151013#M28936</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;I got a VB Macro in my QV-Application (8.5) which prepares data for a report. I need to copy, for example, Sheet "Sheet1" and rename it to "Revenue".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Excel Macro Recorder gives me this operation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;Sheets("Sheet1").Copy After:=Sheets(2)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Normally I know hot wo convert these operations into a language QV understands it, but in this case I dont.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;ExcelDoc.Sheets("Sheet1").Copy After:=Sheets(2)&lt;/PRE&gt;- Could anynone tell me how to replace the "After:=Sheets(2) "&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;And in general: Hod do i find out how to convert such operations into the VBS Syntax?&lt;/P&gt;&lt;P&gt;Thanks in advance and KindRegards!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Aug 2009 19:22:02 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-08-04T19:22:02Z</dc:date>
    <item>
      <title>Copy Excel sheet (VB Macro)</title>
      <link>https://community.qlik.com/t5/QlikView/Copy-Excel-sheet-VB-Macro/m-p/151013#M28936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;I got a VB Macro in my QV-Application (8.5) which prepares data for a report. I need to copy, for example, Sheet "Sheet1" and rename it to "Revenue".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Excel Macro Recorder gives me this operation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;Sheets("Sheet1").Copy After:=Sheets(2)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Normally I know hot wo convert these operations into a language QV understands it, but in this case I dont.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;ExcelDoc.Sheets("Sheet1").Copy After:=Sheets(2)&lt;/PRE&gt;- Could anynone tell me how to replace the "After:=Sheets(2) "&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;And in general: Hod do i find out how to convert such operations into the VBS Syntax?&lt;/P&gt;&lt;P&gt;Thanks in advance and KindRegards!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2009 19:22:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Copy-Excel-sheet-VB-Macro/m-p/151013#M28936</guid>
      <dc:creator />
      <dc:date>2009-08-04T19:22:02Z</dc:date>
    </item>
    <item>
      <title>Copy Excel sheet (VB Macro)</title>
      <link>https://community.qlik.com/t5/QlikView/Copy-Excel-sheet-VB-Macro/m-p/151014#M28937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm assuming that you know that Copy is a function and VB expects it to look like: .Copy(...). If you go into the Macro Editor within Excel and click F2, you will get the Object Browser. The Object Browser gives you all the info you need about the Excel API (similar to QlikView's API Guide).&lt;/P&gt;&lt;P&gt;The Copy function on Sheets takes two parameters, Before and After. Unfortunately, I couldn't figure out how to only pass the After. In order to pass Sheets(2), you need to properly reference it as an Excel object.&lt;/P&gt;&lt;P&gt;This will make that line work, but you may need to adjust the position the sheet is pasted in:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;ExcelDoc.Sheets("Sheet1").Copy(ExcelDoc.Sheets(2))&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2009 20:50:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Copy-Excel-sheet-VB-Macro/m-p/151014#M28937</guid>
      <dc:creator />
      <dc:date>2009-08-04T20:50:26Z</dc:date>
    </item>
    <item>
      <title>Copy Excel sheet (VB Macro)</title>
      <link>https://community.qlik.com/t5/QlikView/Copy-Excel-sheet-VB-Macro/m-p/151015#M28938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi NMiller,&lt;/P&gt;&lt;P&gt;thanks for the verification because I found the soultion by myself this minute &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; But more by try&amp;amp;and error than using the objectbrowser...&lt;/P&gt;&lt;P&gt;Neither did I found out how to place it properly with something similar to before/after, in this case it doesnt matter so the problem is solved for me.&lt;/P&gt;&lt;P&gt;Thanks for the solution and the tip with the objectbrowser!&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2009 21:10:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Copy-Excel-sheet-VB-Macro/m-p/151015#M28938</guid>
      <dc:creator />
      <dc:date>2009-08-04T21:10:36Z</dc:date>
    </item>
  </channel>
</rss>

