<?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 Using Script to execute macro function that Creates Folder in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-Script-to-execute-macro-function-that-Creates-Folder/m-p/156715#M32485</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;Hi Guys,&lt;/P&gt;&lt;P dir="ltr"&gt;I wrote a macro that creates a folder into a specific location.&lt;/P&gt;&lt;P dir="ltr"&gt;When Testing (with Debug) the macro in QV, it works, and the folder is created.&lt;/P&gt;&lt;P dir="ltr"&gt;Now, I need to somehow call the function during script execution.&lt;/P&gt;&lt;P dir="ltr"&gt;I tried something like below, but it isn't working.&lt;/P&gt;&lt;P dir="ltr"&gt;How can I work it around?&lt;/P&gt;&lt;P dir="ltr"&gt;Thanks in advance,&lt;/P&gt;&lt;P dir="ltr"&gt;Aldo.&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;B&gt;Sub&lt;/B&gt; CreateFolder&lt;/P&gt;&lt;P dir="ltr"&gt;fsoCreateFolder()&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;B&gt;End&lt;/B&gt; &lt;B&gt;Sub&lt;/B&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;B&gt;Call&lt;/B&gt; CreateFolder;&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;B&gt;Function&lt;/B&gt; fsoCreateFolder()&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;B&gt;Dim&lt;/B&gt; objFSO&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;B&gt;Dim&lt;/B&gt; objFolder&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;B&gt;Dim&lt;/B&gt; Overwrite&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;B&gt;Dim&lt;/B&gt; FolderName: FolderName = "BKS11"&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;B&gt;Dim&lt;/B&gt; FolderPath: FolderPath = "C:\Temp"&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;B&gt;Set&lt;/B&gt; objFSO = &lt;B&gt;CreateObject&lt;/B&gt;("Scripting.FileSystemObject")&lt;/P&gt;&lt;P dir="ltr"&gt;Overwrite = objFSO.FolderExists(FolderPath &amp;amp; "" &amp;amp; FolderName)&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;B&gt;Select&lt;/B&gt; &lt;B&gt;Case&lt;/B&gt; Overwrite&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;B&gt;Case&lt;/B&gt; &lt;B&gt;False&lt;/B&gt;: &lt;B&gt;Set&lt;/B&gt; objFolder = objFSO.CreateFolder(FolderPath &amp;amp; "" &amp;amp; FolderName)&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;B&gt;Case&lt;/B&gt; &lt;B&gt;Else&lt;/B&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;B&gt;End&lt;/B&gt; &lt;B&gt;Select&lt;/B&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;B&gt;Set&lt;/B&gt; objFSO = &lt;B&gt;Nothing&lt;/B&gt;: &lt;B&gt;Set&lt;/B&gt; objFolder = &lt;B&gt;Nothing&lt;/B&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;B&gt;End&lt;/B&gt; &lt;B&gt;Function&lt;/B&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;B&gt;'----------------------&lt;/B&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Aug 2010 11:32:52 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-08-11T11:32:52Z</dc:date>
    <item>
      <title>Using Script to execute macro function that Creates Folder</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Script-to-execute-macro-function-that-Creates-Folder/m-p/156715#M32485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;Hi Guys,&lt;/P&gt;&lt;P dir="ltr"&gt;I wrote a macro that creates a folder into a specific location.&lt;/P&gt;&lt;P dir="ltr"&gt;When Testing (with Debug) the macro in QV, it works, and the folder is created.&lt;/P&gt;&lt;P dir="ltr"&gt;Now, I need to somehow call the function during script execution.&lt;/P&gt;&lt;P dir="ltr"&gt;I tried something like below, but it isn't working.&lt;/P&gt;&lt;P dir="ltr"&gt;How can I work it around?&lt;/P&gt;&lt;P dir="ltr"&gt;Thanks in advance,&lt;/P&gt;&lt;P dir="ltr"&gt;Aldo.&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;B&gt;Sub&lt;/B&gt; CreateFolder&lt;/P&gt;&lt;P dir="ltr"&gt;fsoCreateFolder()&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;B&gt;End&lt;/B&gt; &lt;B&gt;Sub&lt;/B&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;B&gt;Call&lt;/B&gt; CreateFolder;&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;B&gt;Function&lt;/B&gt; fsoCreateFolder()&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;B&gt;Dim&lt;/B&gt; objFSO&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;B&gt;Dim&lt;/B&gt; objFolder&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;B&gt;Dim&lt;/B&gt; Overwrite&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;B&gt;Dim&lt;/B&gt; FolderName: FolderName = "BKS11"&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;B&gt;Dim&lt;/B&gt; FolderPath: FolderPath = "C:\Temp"&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;B&gt;Set&lt;/B&gt; objFSO = &lt;B&gt;CreateObject&lt;/B&gt;("Scripting.FileSystemObject")&lt;/P&gt;&lt;P dir="ltr"&gt;Overwrite = objFSO.FolderExists(FolderPath &amp;amp; "" &amp;amp; FolderName)&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;B&gt;Select&lt;/B&gt; &lt;B&gt;Case&lt;/B&gt; Overwrite&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;B&gt;Case&lt;/B&gt; &lt;B&gt;False&lt;/B&gt;: &lt;B&gt;Set&lt;/B&gt; objFolder = objFSO.CreateFolder(FolderPath &amp;amp; "" &amp;amp; FolderName)&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;B&gt;Case&lt;/B&gt; &lt;B&gt;Else&lt;/B&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;B&gt;End&lt;/B&gt; &lt;B&gt;Select&lt;/B&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;B&gt;Set&lt;/B&gt; objFSO = &lt;B&gt;Nothing&lt;/B&gt;: &lt;B&gt;Set&lt;/B&gt; objFolder = &lt;B&gt;Nothing&lt;/B&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;B&gt;End&lt;/B&gt; &lt;B&gt;Function&lt;/B&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;B&gt;'----------------------&lt;/B&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Aug 2010 11:32:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Script-to-execute-macro-function-that-Creates-Folder/m-p/156715#M32485</guid>
      <dc:creator />
      <dc:date>2010-08-11T11:32:52Z</dc:date>
    </item>
    <item>
      <title>Using Script to execute macro function that Creates Folder</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Script-to-execute-macro-function-that-Creates-Folder/m-p/156716#M32486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try something like that:&lt;/P&gt;&lt;P&gt;let someVariable = fsoCreateFolder();&lt;/P&gt;&lt;P&gt;Read more detail in:&lt;/P&gt;&lt;P&gt;QlikView\Documentation\QlikView Reference Manual.pdf&lt;/P&gt;&lt;P&gt;:Book II&lt;/P&gt;&lt;P&gt;:28 VBSCRIPT FUNCTION CALLS FROM SCRIPT&lt;/P&gt;&lt;P&gt;page 855&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Aug 2010 09:28:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Script-to-execute-macro-function-that-Creates-Folder/m-p/156716#M32486</guid>
      <dc:creator />
      <dc:date>2010-08-19T09:28:58Z</dc:date>
    </item>
    <item>
      <title>Using Script to execute macro function that Creates Folder</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Script-to-execute-macro-function-that-Creates-Folder/m-p/156717#M32487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Aug 2010 07:30:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Script-to-execute-macro-function-that-Creates-Folder/m-p/156717#M32487</guid>
      <dc:creator />
      <dc:date>2010-08-22T07:30:56Z</dc:date>
    </item>
    <item>
      <title>Using Script to execute macro function that Creates Folder</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Script-to-execute-macro-function-that-Creates-Folder/m-p/156718#M32488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function below (and the call) are actually working.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Aldo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function fsoCreateFolder(FolderPath, FolderName) '(FolderName, FolderPath)&lt;/P&gt;&lt;P&gt;'Function Tested!&lt;/P&gt;&lt;P&gt;'Call the function as below:&lt;/P&gt;&lt;P&gt;'load fsoCreateFolder('$(vRootDir)', 'Created Folder No 1') autogenerate 1;&lt;/P&gt;&lt;P&gt;Dim objFSO&lt;/P&gt;&lt;P&gt;Dim objFolder&lt;/P&gt;&lt;P&gt;Dim Overwrite&lt;/P&gt;&lt;P&gt;Set objFSO = CreateObject("Scripting.FileSystemObject")&lt;/P&gt;&lt;P&gt;Overwrite = objFSO.FolderExists(FolderPath &amp;amp; "\" &amp;amp; FolderName)&lt;/P&gt;&lt;P&gt;Select Case Overwrite&lt;/P&gt;&lt;P&gt;Case False: Set objFolder = objFSO.CreateFolder(FolderPath &amp;amp; "\" &amp;amp; FolderName)&lt;/P&gt;&lt;P&gt;Case Else&lt;/P&gt;&lt;P&gt;End Select&lt;/P&gt;&lt;P&gt;Set objFSO = Nothing: Set objFolder = Nothing&lt;/P&gt;&lt;P&gt;End Function&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Aug 2010 07:31:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Script-to-execute-macro-function-that-Creates-Folder/m-p/156718#M32488</guid>
      <dc:creator />
      <dc:date>2010-08-22T07:31:54Z</dc:date>
    </item>
  </channel>
</rss>

