<?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: How do I use SpreadSheet column number as a dynamic variable in a Macro to Sort a range of cells in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-use-SpreadSheet-column-number-as-a-dynamic-variable-in/m-p/949453#M371401</link>
    <description>And where is the connection with SAS software?</description>
    <pubDate>Wed, 30 Oct 2024 09:20:02 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2024-10-30T09:20:02Z</dc:date>
    <item>
      <title>How do I use SpreadSheet column number as a dynamic variable in a Macro to Sort a range of cells</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-use-SpreadSheet-column-number-as-a-dynamic-variable-in/m-p/949435#M371398</link>
      <description>&lt;P&gt;Two "&lt;FONT color="#FF0000"&gt;rem JB&lt;/FONT&gt;" and one &lt;FONT color="#FF0000"&gt;code line&lt;/FONT&gt; describe my intent and my question in the VB code below:&lt;/P&gt;&lt;P&gt;REM ***** BASIC *****&lt;/P&gt;&lt;P&gt;sub SortA&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;rem JB Macro activated by pushbuttons in any 1 of 11 columns {C-L,M}&lt;/FONT&gt;&lt;BR /&gt;rem define variables&lt;BR /&gt;dim document as object&lt;BR /&gt;dim dispatcher as object&lt;BR /&gt;rem ----------------------------------------------------------------------&lt;BR /&gt;rem get access to the document&lt;BR /&gt;document = ThisComponent.CurrentController.Frame&lt;BR /&gt;dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")&lt;/P&gt;&lt;P&gt;rem ----------------------------------------------------------------------&lt;BR /&gt;dim args1(0) as new com.sun.star.beans.PropertyValue&lt;BR /&gt;args1(0).Name = "ToPoint"&lt;BR /&gt;args1(0).Value = "AreaSort"&lt;/P&gt;&lt;P&gt;dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1())&lt;/P&gt;&lt;P&gt;rem ----------------------------------------------------------------------&lt;BR /&gt;rem dispatcher.executeDispatch(document, ".uno:DataSort", "", 0, Array())&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;rem JB Set args3(6).Value to the column value of the cell with the push button JB&lt;/FONT&gt;&lt;BR /&gt;dim args3(9) as new com.sun.star.beans.PropertyValue&lt;BR /&gt;args3(0).Name = "ByRows"&lt;BR /&gt;args3(0).Value = true&lt;BR /&gt;args3(1).Name = "HasHeader"&lt;BR /&gt;args3(1).Value = false&lt;BR /&gt;args3(2).Name = "CaseSensitive"&lt;BR /&gt;args3(2).Value = false&lt;BR /&gt;args3(3).Name = "NaturalSort"&lt;BR /&gt;args3(3).Value = false&lt;BR /&gt;args3(4).Name = "IncludeAttribs"&lt;BR /&gt;args3(4).Value = true&lt;BR /&gt;args3(5).Name = "UserDefIndex"&lt;BR /&gt;args3(5).Value = 0&lt;BR /&gt;args3(6).Name = "Col1"&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;args3(6).Value = 14&lt;/FONT&gt;&lt;BR /&gt;args3(7).Name = "Ascending1"&lt;BR /&gt;args3(7).Value = true&lt;BR /&gt;args3(8).Name = "IncludeComments"&lt;BR /&gt;args3(8).Value = false&lt;BR /&gt;args3(9).Name = "IncludeImages"&lt;BR /&gt;args3(9).Value = true&lt;/P&gt;&lt;P&gt;dispatcher.executeDispatch(document, ".uno:DataSort", "", 0, args3())&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;P&gt;REM End ***** BASIC *****&lt;/P&gt;&lt;P&gt;LibreOffice 24.2.6.2 (X86_64)&lt;/P&gt;&lt;P&gt;If you can help, thank you; if not, I will post my solution when I find it. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2024 00:07:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-use-SpreadSheet-column-number-as-a-dynamic-variable-in/m-p/949435#M371398</guid>
      <dc:creator>JoeBachofen</dc:creator>
      <dc:date>2024-10-30T00:07:13Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use SpreadSheet column number as a dynamic variable in a Macro to Sort a range of cells</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-use-SpreadSheet-column-number-as-a-dynamic-variable-in/m-p/949453#M371401</link>
      <description>And where is the connection with SAS software?</description>
      <pubDate>Wed, 30 Oct 2024 09:20:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-use-SpreadSheet-column-number-as-a-dynamic-variable-in/m-p/949453#M371401</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2024-10-30T09:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use SpreadSheet column number as a dynamic variable in a Macro to Sort a range of cells</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-use-SpreadSheet-column-number-as-a-dynamic-variable-in/m-p/949508#M371414</link>
      <description>&lt;P&gt;My apologies, I had seen a similar but less detailed post on the SAS community site with no apparent connection to SAS sw so I assumed it was a reasonable question to ask. I am close an answer on my own but I do appreciate your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have fun today. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2024 17:52:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-use-SpreadSheet-column-number-as-a-dynamic-variable-in/m-p/949508#M371414</guid>
      <dc:creator>JoeBachofen</dc:creator>
      <dc:date>2024-10-30T17:52:52Z</dc:date>
    </item>
  </channel>
</rss>

