<?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: Launch SAS project (EGP) with VBS in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Launch-SAS-project-EGP-and-RUN-specific-ProcessFlow-with-VBS/m-p/71869#M7149</link>
    <description>&amp;gt; Check the SAS support  &lt;A href="http://support.sas.com/" target="_blank"&gt;http://support.sas.com/&lt;/A&gt;&lt;BR /&gt;
&amp;gt; website - much info and reference resources to be&lt;BR /&gt;
&amp;gt; found there.  Also, check the SAS forums archive as&lt;BR /&gt;
&amp;gt;  well.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Scott Barry&lt;BR /&gt;
&amp;gt; SBBWorks, Inc.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Suggested Google advanced search argument, this&lt;BR /&gt;
&amp;gt; topic/post:&lt;BR /&gt;
&amp;gt; enterprise guide launch project site:sas.com&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;Thanks !&lt;BR /&gt;
&lt;BR /&gt;
I found something which could be interesting but ... I 'm quite noob in VBS.&lt;BR /&gt;
&lt;BR /&gt;
The original code I found in the support.sas in the following (see here attached under).&lt;BR /&gt;
&lt;BR /&gt;
I just need a "quite simpler script" which will launch SE Guide and run the processflow.&lt;BR /&gt;
&lt;BR /&gt;
Is somebody able to help me with this ?   :s&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
&lt;/B&gt;&lt;BR /&gt;
- - - - - -&lt;BR /&gt;
&lt;BR /&gt;
Option Explicit&lt;BR /&gt;
Dim app         ' As SASEGuide.Application&lt;BR /&gt;
&lt;BR /&gt;
Dim prjName     ' As String&lt;BR /&gt;
Dim prjObject   ' As SASEGuide.Project&lt;BR /&gt;
&lt;BR /&gt;
Dim PFDName     ' As String&lt;BR /&gt;
Dim PFDObject   ' As SASEGuide.ProcessFlow&lt;BR /&gt;
Dim pfdColl     ' As SASEGuide.ProcessFlowCollection&lt;BR /&gt;
&lt;BR /&gt;
prjName = "C:\Documents and Settings\PFD_Order.egp" ' Project Name&lt;BR /&gt;
&lt;BR /&gt;
Call dowork2&lt;BR /&gt;
Call dowork1&lt;BR /&gt;
Call dowork3&lt;BR /&gt;
Call CloseAndQuit&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Sub dowork2()&lt;BR /&gt;
    On Error Resume Next&lt;BR /&gt;
    '----&lt;BR /&gt;
    ' Start up Enterprise Guide using the project name&lt;BR /&gt;
    '----&lt;BR /&gt;
   &lt;BR /&gt;
    &lt;BR /&gt;
    PFDName = "PFD2" ' PFD Name&lt;BR /&gt;
      &lt;BR /&gt;
    Set app = CreateObject("SASEGObjectModel.Application")&lt;BR /&gt;
    If Checkerror("CreateObject") = True Then&lt;BR /&gt;
        Exit Sub&lt;BR /&gt;
    End If&lt;BR /&gt;
    &lt;BR /&gt;
    Set prjObject = app.Open(prjName,"")&lt;BR /&gt;
    If Checkerror("App.Open") = True Then&lt;BR /&gt;
        Exit Sub&lt;BR /&gt;
    End If&lt;BR /&gt;
    &lt;BR /&gt;
        &lt;BR /&gt;
    '-----&lt;BR /&gt;
    'Get The PFD Collection and Object&lt;BR /&gt;
    '-----    &lt;BR /&gt;
    Set pfdColl = prjObject.ProcessFlowCollection&lt;BR /&gt;
    If Checkerror("Project.ProcessFlowCollection") = True Then&lt;BR /&gt;
        Exit Sub&lt;BR /&gt;
    End If&lt;BR /&gt;
    &lt;BR /&gt;
    Dim i       ' As Long&lt;BR /&gt;
    Dim count   ' As Long&lt;BR /&gt;
    count = pfdColl.count&lt;BR /&gt;
    For i = 0 To count&lt;BR /&gt;
        Set PFDObject = pfdColl.Item(i)&lt;BR /&gt;
        If Checkerror("ProcessFlowCollection.Item") = True Then&lt;BR /&gt;
            Exit Sub&lt;BR /&gt;
        End If&lt;BR /&gt;
        &lt;BR /&gt;
        If (PFDObject.Name = pfdName) Then&lt;BR /&gt;
            Exit For&lt;BR /&gt;
        Else&lt;BR /&gt;
            Set PFDObject = Nothing&lt;BR /&gt;
        End If&lt;BR /&gt;
    Next &lt;BR /&gt;
    &lt;BR /&gt;
    If not (PFDObject Is Nothing) Then&lt;BR /&gt;
        '----&lt;BR /&gt;
        ' Run the PFD&lt;BR /&gt;
        '----&lt;BR /&gt;
        PFDObject.Run&lt;BR /&gt;
        If Checkerror("ProcessFlow.Run") = True Then&lt;BR /&gt;
            Exit Sub&lt;BR /&gt;
        End If               &lt;BR /&gt;
    End If&lt;BR /&gt;
                &lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Sub dowork1()&lt;BR /&gt;
    On Error Resume Next&lt;BR /&gt;
    '----&lt;BR /&gt;
    ' Start up Enterprise Guide using the project name&lt;BR /&gt;
    '----&lt;BR /&gt;
   &lt;BR /&gt;
    PFDName = "PFD1" ' PFD Name&lt;BR /&gt;
    &lt;BR /&gt;
        &lt;BR /&gt;
    '-----&lt;BR /&gt;
    'Get The PFD Collection and Object&lt;BR /&gt;
    '-----    &lt;BR /&gt;
    Set pfdColl = prjObject.ProcessFlowCollection&lt;BR /&gt;
    If Checkerror("Project.ProcessFlowCollection") = True Then&lt;BR /&gt;
        Exit Sub&lt;BR /&gt;
    End If&lt;BR /&gt;
    &lt;BR /&gt;
    Dim i       ' As Long&lt;BR /&gt;
    Dim count   ' As Long&lt;BR /&gt;
    count = pfdColl.count&lt;BR /&gt;
    For i = 0 To count&lt;BR /&gt;
        Set PFDObject = pfdColl.Item(i)&lt;BR /&gt;
        If Checkerror("ProcessFlowCollection.Item") = True Then&lt;BR /&gt;
            Exit Sub&lt;BR /&gt;
        End If&lt;BR /&gt;
        &lt;BR /&gt;
        If (PFDObject.Name = pfdName) Then&lt;BR /&gt;
            Exit For&lt;BR /&gt;
        Else&lt;BR /&gt;
            Set PFDObject = Nothing&lt;BR /&gt;
        End If&lt;BR /&gt;
    Next &lt;BR /&gt;
    &lt;BR /&gt;
    If not (PFDObject Is Nothing) Then&lt;BR /&gt;
        '----&lt;BR /&gt;
        ' Run the PFD&lt;BR /&gt;
        '----&lt;BR /&gt;
        PFDObject.Run&lt;BR /&gt;
        If Checkerror("ProcessFlow.Run") = True Then&lt;BR /&gt;
            Exit Sub&lt;BR /&gt;
        End If               &lt;BR /&gt;
    End If&lt;BR /&gt;
                &lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Sub dowork3()&lt;BR /&gt;
    On Error Resume Next&lt;BR /&gt;
    '----&lt;BR /&gt;
    ' Start up Enterprise Guide using the project name&lt;BR /&gt;
    '----&lt;BR /&gt;
   &lt;BR /&gt;
    PFDName = "PFD3" ' PFD Name&lt;BR /&gt;
    &lt;BR /&gt;
        &lt;BR /&gt;
    '-----&lt;BR /&gt;
    'Get The PFD Collection and Object&lt;BR /&gt;
    '-----    &lt;BR /&gt;
    Set pfdColl = prjObject.ProcessFlowCollection&lt;BR /&gt;
    If Checkerror("Project.ProcessFlowCollection") = True Then&lt;BR /&gt;
        Exit Sub&lt;BR /&gt;
    End If&lt;BR /&gt;
    &lt;BR /&gt;
    Dim i       ' As Long&lt;BR /&gt;
    Dim count   ' As Long&lt;BR /&gt;
    count = pfdColl.count&lt;BR /&gt;
    For i = 0 To count&lt;BR /&gt;
        Set PFDObject = pfdColl.Item(i)&lt;BR /&gt;
        If Checkerror("ProcessFlowCollection.Item") = True Then&lt;BR /&gt;
            Exit Sub&lt;BR /&gt;
        End If&lt;BR /&gt;
        &lt;BR /&gt;
        If (PFDObject.Name = pfdName) Then&lt;BR /&gt;
            Exit For&lt;BR /&gt;
        Else&lt;BR /&gt;
            Set PFDObject = Nothing&lt;BR /&gt;
        End If&lt;BR /&gt;
    Next &lt;BR /&gt;
    &lt;BR /&gt;
    If not (PFDObject Is Nothing) Then&lt;BR /&gt;
        '----&lt;BR /&gt;
        ' Run the PFD&lt;BR /&gt;
        '----&lt;BR /&gt;
        PFDObject.Run&lt;BR /&gt;
        If Checkerror("ProcessFlow.Run") = True Then&lt;BR /&gt;
            Exit Sub&lt;BR /&gt;
        End If               &lt;BR /&gt;
    End If&lt;BR /&gt;
                &lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Sub CloseAndQuit()&lt;BR /&gt;
&lt;BR /&gt;
' Save the new project&lt;BR /&gt;
    '-----&lt;BR /&gt;
    prjObject.Save&lt;BR /&gt;
    If Checkerror("Project.Save") = True Then&lt;BR /&gt;
        Exit Sub&lt;BR /&gt;
    End If&lt;BR /&gt;
    &lt;BR /&gt;
    '-----&lt;BR /&gt;
    ' Close the project&lt;BR /&gt;
    '-----&lt;BR /&gt;
    prjObject.Close&lt;BR /&gt;
    If Checkerror("Project.Close") = True Then&lt;BR /&gt;
        Exit Sub&lt;BR /&gt;
    End If&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Function Checkerror(fnName)&lt;BR /&gt;
    Checkerror = False&lt;BR /&gt;
    &lt;BR /&gt;
    Dim strmsg      ' As String&lt;BR /&gt;
    Dim errNum      ' As Long&lt;BR /&gt;
    &lt;BR /&gt;
    If Err.Number &amp;lt;&amp;gt; 0 Then&lt;BR /&gt;
        strmsg = "Error #" &amp;amp; Hex(Err.Number) &amp;amp; vbCrLf &amp;amp; "In Function " &amp;amp; fnName &amp;amp; vbCrLf &amp;amp; Err.Description&lt;BR /&gt;
        'MsgBox strmsg  'Uncomment this line if you want to be notified via MessageBox of Errors in the script.&lt;BR /&gt;
        Checkerror = True&lt;BR /&gt;
    End If&lt;BR /&gt;
         &lt;BR /&gt;
End Function&lt;BR /&gt;
&lt;BR /&gt;
- - - - - -

Message was edited by: Fab.from.be</description>
    <pubDate>Sun, 28 Mar 2010 18:40:36 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2010-03-28T18:40:36Z</dc:date>
    <item>
      <title>Launch SAS project (EGP) and RUN specific ProcessFlow with VBS</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Launch-SAS-project-EGP-and-RUN-specific-ProcessFlow-with-VBS/m-p/71867#M7147</link>
      <description>&lt;B&gt;Set WshShell = CreateObject("WScript.Shell")&lt;BR /&gt;
WshShell.Run "SEGuide.exe K:\RUN\Process\TRY.egp"""&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
Hello world &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
I create a macro to launch a specfic project with SE Guide.&lt;BR /&gt;
&lt;BR /&gt;
But ...&lt;BR /&gt;
&lt;BR /&gt;
I would like to RUN a specific process flow (name = DATA) of the project (TRY.egp).&lt;BR /&gt;
&lt;BR /&gt;
Is it possible to specify in the script vbs that the process flow named "DATA" has to be opened and RUN (F3) ?&lt;BR /&gt;
&lt;BR /&gt;
If not, is there any way to do it otherwise ?&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance.&lt;BR /&gt;
&lt;BR /&gt;
Best regards

Message was edited by: Fab.from.be</description>
      <pubDate>Sun, 28 Mar 2010 16:36:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Launch-SAS-project-EGP-and-RUN-specific-ProcessFlow-with-VBS/m-p/71867#M7147</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-03-28T16:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: Launch SAS project (EGP) with VBS</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Launch-SAS-project-EGP-and-RUN-specific-ProcessFlow-with-VBS/m-p/71868#M7148</link>
      <description>Check the SAS support  &lt;A href="http://support.sas.com/" target="_blank"&gt;http://support.sas.com/&lt;/A&gt;  website - much info and reference resources to be found there.  Also, check the SAS forums archive as well.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Suggested Google advanced search argument, this topic/post:&lt;BR /&gt;
enterprise guide launch project site:sas.com</description>
      <pubDate>Sun, 28 Mar 2010 16:57:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Launch-SAS-project-EGP-and-RUN-specific-ProcessFlow-with-VBS/m-p/71868#M7148</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-03-28T16:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: Launch SAS project (EGP) with VBS</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Launch-SAS-project-EGP-and-RUN-specific-ProcessFlow-with-VBS/m-p/71869#M7149</link>
      <description>&amp;gt; Check the SAS support  &lt;A href="http://support.sas.com/" target="_blank"&gt;http://support.sas.com/&lt;/A&gt;&lt;BR /&gt;
&amp;gt; website - much info and reference resources to be&lt;BR /&gt;
&amp;gt; found there.  Also, check the SAS forums archive as&lt;BR /&gt;
&amp;gt;  well.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Scott Barry&lt;BR /&gt;
&amp;gt; SBBWorks, Inc.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Suggested Google advanced search argument, this&lt;BR /&gt;
&amp;gt; topic/post:&lt;BR /&gt;
&amp;gt; enterprise guide launch project site:sas.com&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;Thanks !&lt;BR /&gt;
&lt;BR /&gt;
I found something which could be interesting but ... I 'm quite noob in VBS.&lt;BR /&gt;
&lt;BR /&gt;
The original code I found in the support.sas in the following (see here attached under).&lt;BR /&gt;
&lt;BR /&gt;
I just need a "quite simpler script" which will launch SE Guide and run the processflow.&lt;BR /&gt;
&lt;BR /&gt;
Is somebody able to help me with this ?   :s&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
&lt;/B&gt;&lt;BR /&gt;
- - - - - -&lt;BR /&gt;
&lt;BR /&gt;
Option Explicit&lt;BR /&gt;
Dim app         ' As SASEGuide.Application&lt;BR /&gt;
&lt;BR /&gt;
Dim prjName     ' As String&lt;BR /&gt;
Dim prjObject   ' As SASEGuide.Project&lt;BR /&gt;
&lt;BR /&gt;
Dim PFDName     ' As String&lt;BR /&gt;
Dim PFDObject   ' As SASEGuide.ProcessFlow&lt;BR /&gt;
Dim pfdColl     ' As SASEGuide.ProcessFlowCollection&lt;BR /&gt;
&lt;BR /&gt;
prjName = "C:\Documents and Settings\PFD_Order.egp" ' Project Name&lt;BR /&gt;
&lt;BR /&gt;
Call dowork2&lt;BR /&gt;
Call dowork1&lt;BR /&gt;
Call dowork3&lt;BR /&gt;
Call CloseAndQuit&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Sub dowork2()&lt;BR /&gt;
    On Error Resume Next&lt;BR /&gt;
    '----&lt;BR /&gt;
    ' Start up Enterprise Guide using the project name&lt;BR /&gt;
    '----&lt;BR /&gt;
   &lt;BR /&gt;
    &lt;BR /&gt;
    PFDName = "PFD2" ' PFD Name&lt;BR /&gt;
      &lt;BR /&gt;
    Set app = CreateObject("SASEGObjectModel.Application")&lt;BR /&gt;
    If Checkerror("CreateObject") = True Then&lt;BR /&gt;
        Exit Sub&lt;BR /&gt;
    End If&lt;BR /&gt;
    &lt;BR /&gt;
    Set prjObject = app.Open(prjName,"")&lt;BR /&gt;
    If Checkerror("App.Open") = True Then&lt;BR /&gt;
        Exit Sub&lt;BR /&gt;
    End If&lt;BR /&gt;
    &lt;BR /&gt;
        &lt;BR /&gt;
    '-----&lt;BR /&gt;
    'Get The PFD Collection and Object&lt;BR /&gt;
    '-----    &lt;BR /&gt;
    Set pfdColl = prjObject.ProcessFlowCollection&lt;BR /&gt;
    If Checkerror("Project.ProcessFlowCollection") = True Then&lt;BR /&gt;
        Exit Sub&lt;BR /&gt;
    End If&lt;BR /&gt;
    &lt;BR /&gt;
    Dim i       ' As Long&lt;BR /&gt;
    Dim count   ' As Long&lt;BR /&gt;
    count = pfdColl.count&lt;BR /&gt;
    For i = 0 To count&lt;BR /&gt;
        Set PFDObject = pfdColl.Item(i)&lt;BR /&gt;
        If Checkerror("ProcessFlowCollection.Item") = True Then&lt;BR /&gt;
            Exit Sub&lt;BR /&gt;
        End If&lt;BR /&gt;
        &lt;BR /&gt;
        If (PFDObject.Name = pfdName) Then&lt;BR /&gt;
            Exit For&lt;BR /&gt;
        Else&lt;BR /&gt;
            Set PFDObject = Nothing&lt;BR /&gt;
        End If&lt;BR /&gt;
    Next &lt;BR /&gt;
    &lt;BR /&gt;
    If not (PFDObject Is Nothing) Then&lt;BR /&gt;
        '----&lt;BR /&gt;
        ' Run the PFD&lt;BR /&gt;
        '----&lt;BR /&gt;
        PFDObject.Run&lt;BR /&gt;
        If Checkerror("ProcessFlow.Run") = True Then&lt;BR /&gt;
            Exit Sub&lt;BR /&gt;
        End If               &lt;BR /&gt;
    End If&lt;BR /&gt;
                &lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Sub dowork1()&lt;BR /&gt;
    On Error Resume Next&lt;BR /&gt;
    '----&lt;BR /&gt;
    ' Start up Enterprise Guide using the project name&lt;BR /&gt;
    '----&lt;BR /&gt;
   &lt;BR /&gt;
    PFDName = "PFD1" ' PFD Name&lt;BR /&gt;
    &lt;BR /&gt;
        &lt;BR /&gt;
    '-----&lt;BR /&gt;
    'Get The PFD Collection and Object&lt;BR /&gt;
    '-----    &lt;BR /&gt;
    Set pfdColl = prjObject.ProcessFlowCollection&lt;BR /&gt;
    If Checkerror("Project.ProcessFlowCollection") = True Then&lt;BR /&gt;
        Exit Sub&lt;BR /&gt;
    End If&lt;BR /&gt;
    &lt;BR /&gt;
    Dim i       ' As Long&lt;BR /&gt;
    Dim count   ' As Long&lt;BR /&gt;
    count = pfdColl.count&lt;BR /&gt;
    For i = 0 To count&lt;BR /&gt;
        Set PFDObject = pfdColl.Item(i)&lt;BR /&gt;
        If Checkerror("ProcessFlowCollection.Item") = True Then&lt;BR /&gt;
            Exit Sub&lt;BR /&gt;
        End If&lt;BR /&gt;
        &lt;BR /&gt;
        If (PFDObject.Name = pfdName) Then&lt;BR /&gt;
            Exit For&lt;BR /&gt;
        Else&lt;BR /&gt;
            Set PFDObject = Nothing&lt;BR /&gt;
        End If&lt;BR /&gt;
    Next &lt;BR /&gt;
    &lt;BR /&gt;
    If not (PFDObject Is Nothing) Then&lt;BR /&gt;
        '----&lt;BR /&gt;
        ' Run the PFD&lt;BR /&gt;
        '----&lt;BR /&gt;
        PFDObject.Run&lt;BR /&gt;
        If Checkerror("ProcessFlow.Run") = True Then&lt;BR /&gt;
            Exit Sub&lt;BR /&gt;
        End If               &lt;BR /&gt;
    End If&lt;BR /&gt;
                &lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Sub dowork3()&lt;BR /&gt;
    On Error Resume Next&lt;BR /&gt;
    '----&lt;BR /&gt;
    ' Start up Enterprise Guide using the project name&lt;BR /&gt;
    '----&lt;BR /&gt;
   &lt;BR /&gt;
    PFDName = "PFD3" ' PFD Name&lt;BR /&gt;
    &lt;BR /&gt;
        &lt;BR /&gt;
    '-----&lt;BR /&gt;
    'Get The PFD Collection and Object&lt;BR /&gt;
    '-----    &lt;BR /&gt;
    Set pfdColl = prjObject.ProcessFlowCollection&lt;BR /&gt;
    If Checkerror("Project.ProcessFlowCollection") = True Then&lt;BR /&gt;
        Exit Sub&lt;BR /&gt;
    End If&lt;BR /&gt;
    &lt;BR /&gt;
    Dim i       ' As Long&lt;BR /&gt;
    Dim count   ' As Long&lt;BR /&gt;
    count = pfdColl.count&lt;BR /&gt;
    For i = 0 To count&lt;BR /&gt;
        Set PFDObject = pfdColl.Item(i)&lt;BR /&gt;
        If Checkerror("ProcessFlowCollection.Item") = True Then&lt;BR /&gt;
            Exit Sub&lt;BR /&gt;
        End If&lt;BR /&gt;
        &lt;BR /&gt;
        If (PFDObject.Name = pfdName) Then&lt;BR /&gt;
            Exit For&lt;BR /&gt;
        Else&lt;BR /&gt;
            Set PFDObject = Nothing&lt;BR /&gt;
        End If&lt;BR /&gt;
    Next &lt;BR /&gt;
    &lt;BR /&gt;
    If not (PFDObject Is Nothing) Then&lt;BR /&gt;
        '----&lt;BR /&gt;
        ' Run the PFD&lt;BR /&gt;
        '----&lt;BR /&gt;
        PFDObject.Run&lt;BR /&gt;
        If Checkerror("ProcessFlow.Run") = True Then&lt;BR /&gt;
            Exit Sub&lt;BR /&gt;
        End If               &lt;BR /&gt;
    End If&lt;BR /&gt;
                &lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Sub CloseAndQuit()&lt;BR /&gt;
&lt;BR /&gt;
' Save the new project&lt;BR /&gt;
    '-----&lt;BR /&gt;
    prjObject.Save&lt;BR /&gt;
    If Checkerror("Project.Save") = True Then&lt;BR /&gt;
        Exit Sub&lt;BR /&gt;
    End If&lt;BR /&gt;
    &lt;BR /&gt;
    '-----&lt;BR /&gt;
    ' Close the project&lt;BR /&gt;
    '-----&lt;BR /&gt;
    prjObject.Close&lt;BR /&gt;
    If Checkerror("Project.Close") = True Then&lt;BR /&gt;
        Exit Sub&lt;BR /&gt;
    End If&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Function Checkerror(fnName)&lt;BR /&gt;
    Checkerror = False&lt;BR /&gt;
    &lt;BR /&gt;
    Dim strmsg      ' As String&lt;BR /&gt;
    Dim errNum      ' As Long&lt;BR /&gt;
    &lt;BR /&gt;
    If Err.Number &amp;lt;&amp;gt; 0 Then&lt;BR /&gt;
        strmsg = "Error #" &amp;amp; Hex(Err.Number) &amp;amp; vbCrLf &amp;amp; "In Function " &amp;amp; fnName &amp;amp; vbCrLf &amp;amp; Err.Description&lt;BR /&gt;
        'MsgBox strmsg  'Uncomment this line if you want to be notified via MessageBox of Errors in the script.&lt;BR /&gt;
        Checkerror = True&lt;BR /&gt;
    End If&lt;BR /&gt;
         &lt;BR /&gt;
End Function&lt;BR /&gt;
&lt;BR /&gt;
- - - - - -

Message was edited by: Fab.from.be</description>
      <pubDate>Sun, 28 Mar 2010 18:40:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Launch-SAS-project-EGP-and-RUN-specific-ProcessFlow-with-VBS/m-p/71869#M7149</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-03-28T18:40:36Z</dc:date>
    </item>
  </channel>
</rss>

