Windows Vista Forums

recursion help request
  1. #1


    Vgolfmaster Guest

    recursion help request


    hi,

    I have a vbscript that I can not get to recurs properly. If the user enters
    '5' for input, the script should end. For ALL other input: invalid data
    returns to the inputbox (this works), and valid data should execute the
    corresponding sub-routines, and then return to the inputbox. I am unable to
    format this so far to get it to do this. I have tried loops and ended up with
    mostly endless loops. I have also tried to call (a 2nd call) the
    sub-procedure for the main menu (mainmenu()) at the end of the script, but it
    simply stops after the previous sub-routines finish. I have also tried to add
    the mainmenu() call at the end of each sub-routine for option 1thru4 to no
    avail, it still stops after each sub-routine.

    The inputbox and the use of subroutines for the selections 1-4 are required,
    so I can not re-write this entire thing. Any suggestions?

    the script:

    __________________________________________________________
    Option Explicit

    Dim fso, objshl, textfile, title, choice, inputtest, program, exitnow

    Set fso = CreateObject("Scripting.FileSystemObject")
    Set objshl = CreateObject("WScript.Shell")
    textfile = "c:\scriptlog.txt"
    title = "Main Menu - Current Date: " & Date

    '*************************
    'Main Processing Section *
    '*************************

    mainmenu()

    If choice = "1" Then
    Logfile()
    Powerpoint()
    ElseIf choice = "2" then
    Logfile()
    Excel()
    ElseIf choice = "3" Then
    Viewlogfile()
    ElseIf choice = "4" then
    Deletelogfile()
    End If

    '********************************************
    'Main Menu for player input and value testing
    '********************************************
    Sub mainmenu()
    Do Until inputtest = "valid"
    choice = (InputBox(("1. Run PowerPoint") & vbCrLf & ("2. Run Excel")_
    & vbCrLf & ("3. View Log File") & vbCrLf &_
    ("4. Delete Log File") & vbCrLf & ("5. Quit") & vbCrLf &_
    vbCrLf & vbTab & vbTab & vbTab & "Choose By Number",title))

    If choice = "1" Then
    inputtest = "valid"
    program = "PowerPoint"
    ElseIf choice = "2" then
    inputtest = "valid"
    program = "Excel"
    ElseIf choice = "3" Then
    inputtest = "valid"
    ElseIf choice = "4" then
    inputtest = "valid"
    ElseIf choice = "5" Then
    WScript.Quit
    Else MsgBox("Your selection was not valid")
    End If
    Loop
    End Sub

    '**********************************************
    'Create 'start' logfile text for option 1 and 2
    '**********************************************
    Sub Logfile()
    Dim log
    If (fso.FileExists(textfile)) Then
    Set log = fso.OpenTextFile(textfile,8)
    log.WriteLine "-- -- -- -- -- -- -- -- -- -- -- --"
    log.WriteLine ((program) & " started on ") & Date
    log.WriteLine ((program) & " started at ") & Time
    log.WriteLine "-- -- -- --"
    log.close
    Else
    Set log = fso.OpenTextFile(textfile, 2, "true")
    log.WriteLine "-- -- -- -- -- -- -- -- -- -- -- --"
    log.WriteLine ((program) & " started on ") & Date
    log.WriteLine ((program) & " started at ") & Time
    log.WriteLine "-- -- -- --"
    log.close
    End If
    End Sub



    '**************************************
    'Process tasks for option '1' selection
    '**************************************
    Sub Powerpoint()
    Dim log
    objshl.Run "powerpnt.exe",,True
    Set log = fso.OpenTextFile(textfile, 8)
    log.WriteLine "PowerPoint stopped on " & Date
    log.WriteLine "PowerPoint stopped at " & Time
    log.WriteLine "-- -- -- -- -- -- -- -- -- -- -- --"
    log.close()
    End Sub

    '**************************************
    'Process tasks for option '2' selection
    '**************************************
    Sub Excel()
    Dim log
    objshl.Run "excel.exe",,True
    Set log = fso.OpenTextFile(textfile, 8)
    log.WriteLine "Excel stopped on " & Date
    log.WriteLine "Excel stopped at " & Time
    log.WriteLine "-- -- -- -- -- -- -- -- -- -- -- --"
    log.close()
    End Sub

    '**************************************
    'Process tasks for option '3' selection
    '**************************************
    Sub Viewlogfile()
    Dim output, log
    Set log = fso.OpenTextFile(textfile, 1)
    If (fso.FileExists(textfile)) Then
    output = log.ReadAll
    log.Close
    MsgBox output
    Else
    MsgBox("The log file does not exist")
    End If
    End Sub

    '**************************************
    'Process tasks for option '4' selection
    '**************************************
    Sub Deletelogfile()
    Dim confirm, file
    If Not (fso.FileExists(textfile)) Then
    MsgBox "There is no file to delete", 0
    Else
    confirm = MsgBox("Are you sure you wish to delete this?", 4, "Confirm
    Selection")
    If confirm = vbYes Then
    fso.DeleteFile textfile
    Set file = fso.OpenTextFile(textfile, 2, "true")
    file.WriteLine "Logfile created on " & Date & " at " & Time
    file.close
    End if
    End If
    End Sub

      My System SpecsSystem Spec

  2. #2


    Richard Mueller [MVP] Guest

    Re: recursion help request


    "Vgolfmaster" <Vgolfmaster@xxxxxx> wrote in message
    news:811E3A53-97D6-4C04-AD36-F3C6D1FDC10C@xxxxxx

    >
    > hi,
    >
    > I have a vbscript that I can not get to recurs properly. If the user
    > enters
    > '5' for input, the script should end. For ALL other input: invalid data
    > returns to the inputbox (this works), and valid data should execute the
    > corresponding sub-routines, and then return to the inputbox. I am unable
    > to
    > format this so far to get it to do this. I have tried loops and ended up
    > with
    > mostly endless loops. I have also tried to call (a 2nd call) the
    > sub-procedure for the main menu (mainmenu()) at the end of the script, but
    > it
    > simply stops after the previous sub-routines finish. I have also tried to
    > add
    > the mainmenu() call at the end of each sub-routine for option 1thru4 to no
    > avail, it still stops after each sub-routine.
    >
    > The inputbox and the use of subroutines for the selections 1-4 are
    > required,
    > so I can not re-write this entire thing. Any suggestions?
    >
    > the script:
    >
    > __________________________________________________________
    > Option Explicit
    >
    > Dim fso, objshl, textfile, title, choice, inputtest, program, exitnow
    >
    > Set fso = CreateObject("Scripting.FileSystemObject")
    > Set objshl = CreateObject("WScript.Shell")
    > textfile = "c:\scriptlog.txt"
    > title = "Main Menu - Current Date: " & Date
    >
    > '*************************
    > 'Main Processing Section *
    > '*************************
    >
    > mainmenu()
    >
    > If choice = "1" Then
    > Logfile()
    > Powerpoint()
    > ElseIf choice = "2" then
    > Logfile()
    > Excel()
    > ElseIf choice = "3" Then
    > Viewlogfile()
    > ElseIf choice = "4" then
    > Deletelogfile()
    > End If
    >
    > '********************************************
    > 'Main Menu for player input and value testing
    > '********************************************
    > Sub mainmenu()
    > Do Until inputtest = "valid"
    > choice = (InputBox(("1. Run PowerPoint") & vbCrLf & ("2. Run Excel")_
    > & vbCrLf & ("3. View Log File") & vbCrLf &_
    > ("4. Delete Log File") & vbCrLf & ("5. Quit") & vbCrLf &_
    > vbCrLf & vbTab & vbTab & vbTab & "Choose By
    > Number",title))
    >
    > If choice = "1" Then
    > inputtest = "valid"
    > program = "PowerPoint"
    > ElseIf choice = "2" then
    > inputtest = "valid"
    > program = "Excel"
    > ElseIf choice = "3" Then
    > inputtest = "valid"
    > ElseIf choice = "4" then
    > inputtest = "valid"
    > ElseIf choice = "5" Then
    > WScript.Quit
    > Else MsgBox("Your selection was not valid")
    > End If
    > Loop
    > End Sub
    >
    > '**********************************************
    > 'Create 'start' logfile text for option 1 and 2
    > '**********************************************
    > Sub Logfile()
    > Dim log
    > If (fso.FileExists(textfile)) Then
    > Set log = fso.OpenTextFile(textfile,8)
    > log.WriteLine "-- -- -- -- -- -- -- -- -- -- -- --"
    > log.WriteLine ((program) & " started on ") & Date
    > log.WriteLine ((program) & " started at ") & Time
    > log.WriteLine "-- -- -- --"
    > log.close
    > Else
    > Set log = fso.OpenTextFile(textfile, 2, "true")
    > log.WriteLine "-- -- -- -- -- -- -- -- -- -- -- --"
    > log.WriteLine ((program) & " started on ") & Date
    > log.WriteLine ((program) & " started at ") & Time
    > log.WriteLine "-- -- -- --"
    > log.close
    > End If
    > End Sub
    >
    > '**************************************
    > 'Process tasks for option '1' selection
    > '**************************************
    > Sub Powerpoint()
    > Dim log
    > objshl.Run "powerpnt.exe",,True
    > Set log = fso.OpenTextFile(textfile, 8)
    > log.WriteLine "PowerPoint stopped on " & Date
    > log.WriteLine "PowerPoint stopped at " & Time
    > log.WriteLine "-- -- -- -- -- -- -- -- -- -- -- --"
    > log.close()
    > End Sub
    >
    > '**************************************
    > 'Process tasks for option '2' selection
    > '**************************************
    > Sub Excel()
    > Dim log
    > objshl.Run "excel.exe",,True
    > Set log = fso.OpenTextFile(textfile, 8)
    > log.WriteLine "Excel stopped on " & Date
    > log.WriteLine "Excel stopped at " & Time
    > log.WriteLine "-- -- -- -- -- -- -- -- -- -- -- --"
    > log.close()
    > End Sub
    >
    > '**************************************
    > 'Process tasks for option '3' selection
    > '**************************************
    > Sub Viewlogfile()
    > Dim output, log
    > Set log = fso.OpenTextFile(textfile, 1)
    > If (fso.FileExists(textfile)) Then
    > output = log.ReadAll
    > log.Close
    > MsgBox output
    > Else
    > MsgBox("The log file does not exist")
    > End If
    > End Sub
    >
    > '**************************************
    > 'Process tasks for option '4' selection
    > '**************************************
    > Sub Deletelogfile()
    > Dim confirm, file
    > If Not (fso.FileExists(textfile)) Then
    > MsgBox "There is no file to delete", 0
    > Else
    > confirm = MsgBox("Are you sure you wish to delete this?", 4, "Confirm
    > Selection")
    > If confirm = vbYes Then
    > fso.DeleteFile textfile
    > Set file = fso.OpenTextFile(textfile, 2, "true")
    > file.WriteLine "Logfile created on " & Date & " at " & Time
    > file.close
    > End if
    > End If
    > End Sub
    I wouldn't call this recursion, but you want to keep running in the loop
    until the user selects to quit. There must be several ways to do this, but I
    remove the code before the Subs (except the call to mainmenu), then I would
    revise Sub mainmenu as follow:
    ===========
    Sub mainmenu()
    inputtest = "valid"
    Do Until inputtest = "quit"
    choice = (InputBox(("1. Run PowerPoint") _
    & vbCrLf & ("2. Run Excel") _
    & vbCrLf & ("3. View Log File") _
    & vbCrLf & ("4. Delete Log File") _
    & vbCrLf & ("5. Quit") _
    & vbCrLf & vbCrLf _
    & vbTab & vbTab & vbTab & "Choose By Number",title))

    Select Case choice
    Case "1"
    Logfile()
    Powerpoint()
    Case "2"
    Logfile()
    Excel()
    Case "3"
    Viewlogfile()
    Case "4"
    Deletelogfile()
    Case "5"
    inputtest = "quit"
    Case Else
    MsgBox("Your selection was not valid")
    End Select
    Loop
    End Sub
    ========
    This worked for me.

    --
    Richard Mueller
    MVP Directory Services
    Hilltop Lab - http://www.rlmueller.net
    --



      My System SpecsSystem Spec

  3. #3


    Pegasus [MVP] Guest

    Re: recursion help request


    "Vgolfmaster" <Vgolfmaster@xxxxxx> wrote in message
    news:811E3A53-97D6-4C04-AD36-F3C6D1FDC10C@xxxxxx

    >
    > hi,
    >
    > I have a vbscript that I can not get to recurs properly. If the user
    > enters
    > '5' for input, the script should end. For ALL other input: invalid data
    > returns to the inputbox (this works), and valid data should execute the
    > corresponding sub-routines, and then return to the inputbox. I am unable
    > to
    > format this so far to get it to do this. I have tried loops and ended up
    > with
    > mostly endless loops. I have also tried to call (a 2nd call) the
    > sub-procedure for the main menu (mainmenu()) at the end of the script, but
    > it
    > simply stops after the previous sub-routines finish. I have also tried to
    > add
    > the mainmenu() call at the end of each sub-routine for option 1thru4 to no
    > avail, it still stops after each sub-routine.
    >
    > The inputbox and the use of subroutines for the selections 1-4 are
    > required,
    > so I can not re-write this entire thing. Any suggestions?
    >
    > the script:
    Your specification does not require a recursion - it requires a loop. Since
    you expect a defined set of input response from the user, the program cries
    out for a "Case Select" construct rather than a nested if-then-elseif set of
    statements. Here is the main part of your program again. Please note that I
    did not review or test the remainder of the code.

    '*************************
    'Main Processing Section *
    '*************************
    mainmenu()

    Do
    Select Case choice
    Case 1
    program = "PowerPoint"
    Logfile()
    Powerpoint()
    Case 2
    program = "Excel"
    Logfile()
    Excel()
    Case 3
    Viewlogfile()
    Case 4
    Deletelogfile()
    Case Else
    WScript.quit
    End Select
    Loop

    '********************************************
    'Main Menu for player input and value testing
    '********************************************
    Sub mainmenu()
    Do
    choice = (InputBox(_
    ("1. Run PowerPoint") & VbCrLf & _
    ("2. Run Excel") & VbCrLf & _
    ("3. View Log File") & VbCrLf &_
    ("4. Delete Log File") & VbCrLf & _
    ("5. Quit") & VbCrLf & VbCrLf & vbTab & vbTab & vbTab & _
    "Choose By Number",title))
    if IsNumeric(choice) then if (choice > 0) and (choice < 6) then Exit Do
    MsgBox("Your selection was not valid")
    Loop
    End Sub



      My System SpecsSystem Spec

  4. #4


    Vgolfmaster Guest

    Re: recursion help request

    Thanks Richard,

    I agree, recursion was the wrong term. I modified the script using your
    advice and some other input I got, and it is now working!

    Thanks much



    "Richard Mueller [MVP]" wrote:

    >
    > "Vgolfmaster" <Vgolfmaster@xxxxxx> wrote in message
    > news:811E3A53-97D6-4C04-AD36-F3C6D1FDC10C@xxxxxx

    > >
    > > hi,
    > >
    > > I have a vbscript that I can not get to recurs properly. If the user
    > > enters
    > > '5' for input, the script should end. For ALL other input: invalid data
    > > returns to the inputbox (this works), and valid data should execute the
    > > corresponding sub-routines, and then return to the inputbox. I am unable
    > > to
    > > format this so far to get it to do this. I have tried loops and ended up
    > > with
    > > mostly endless loops. I have also tried to call (a 2nd call) the
    > > sub-procedure for the main menu (mainmenu()) at the end of the script, but
    > > it
    > > simply stops after the previous sub-routines finish. I have also tried to
    > > add
    > > the mainmenu() call at the end of each sub-routine for option 1thru4 to no
    > > avail, it still stops after each sub-routine.
    > >
    > > The inputbox and the use of subroutines for the selections 1-4 are
    > > required,
    > > so I can not re-write this entire thing. Any suggestions?
    > >
    > > the script:
    > >
    > > __________________________________________________________
    > > Option Explicit
    > >
    > > Dim fso, objshl, textfile, title, choice, inputtest, program, exitnow
    > >
    > > Set fso = CreateObject("Scripting.FileSystemObject")
    > > Set objshl = CreateObject("WScript.Shell")
    > > textfile = "c:\scriptlog.txt"
    > > title = "Main Menu - Current Date: " & Date
    > >
    > > '*************************
    > > 'Main Processing Section *
    > > '*************************
    > >
    > > mainmenu()
    > >
    > > If choice = "1" Then
    > > Logfile()
    > > Powerpoint()
    > > ElseIf choice = "2" then
    > > Logfile()
    > > Excel()
    > > ElseIf choice = "3" Then
    > > Viewlogfile()
    > > ElseIf choice = "4" then
    > > Deletelogfile()
    > > End If
    > >
    > > '********************************************
    > > 'Main Menu for player input and value testing
    > > '********************************************
    > > Sub mainmenu()
    > > Do Until inputtest = "valid"
    > > choice = (InputBox(("1. Run PowerPoint") & vbCrLf & ("2. Run Excel")_
    > > & vbCrLf & ("3. View Log File") & vbCrLf &_
    > > ("4. Delete Log File") & vbCrLf & ("5. Quit") & vbCrLf &_
    > > vbCrLf & vbTab & vbTab & vbTab & "Choose By
    > > Number",title))
    > >
    > > If choice = "1" Then
    > > inputtest = "valid"
    > > program = "PowerPoint"
    > > ElseIf choice = "2" then
    > > inputtest = "valid"
    > > program = "Excel"
    > > ElseIf choice = "3" Then
    > > inputtest = "valid"
    > > ElseIf choice = "4" then
    > > inputtest = "valid"
    > > ElseIf choice = "5" Then
    > > WScript.Quit
    > > Else MsgBox("Your selection was not valid")
    > > End If
    > > Loop
    > > End Sub
    > >
    > > '**********************************************
    > > 'Create 'start' logfile text for option 1 and 2
    > > '**********************************************
    > > Sub Logfile()
    > > Dim log
    > > If (fso.FileExists(textfile)) Then
    > > Set log = fso.OpenTextFile(textfile,8)
    > > log.WriteLine "-- -- -- -- -- -- -- -- -- -- -- --"
    > > log.WriteLine ((program) & " started on ") & Date
    > > log.WriteLine ((program) & " started at ") & Time
    > > log.WriteLine "-- -- -- --"
    > > log.close
    > > Else
    > > Set log = fso.OpenTextFile(textfile, 2, "true")
    > > log.WriteLine "-- -- -- -- -- -- -- -- -- -- -- --"
    > > log.WriteLine ((program) & " started on ") & Date
    > > log.WriteLine ((program) & " started at ") & Time
    > > log.WriteLine "-- -- -- --"
    > > log.close
    > > End If
    > > End Sub
    > >
    > > '**************************************
    > > 'Process tasks for option '1' selection
    > > '**************************************
    > > Sub Powerpoint()
    > > Dim log
    > > objshl.Run "powerpnt.exe",,True
    > > Set log = fso.OpenTextFile(textfile, 8)
    > > log.WriteLine "PowerPoint stopped on " & Date
    > > log.WriteLine "PowerPoint stopped at " & Time
    > > log.WriteLine "-- -- -- -- -- -- -- -- -- -- -- --"
    > > log.close()
    > > End Sub
    > >
    > > '**************************************
    > > 'Process tasks for option '2' selection
    > > '**************************************
    > > Sub Excel()
    > > Dim log
    > > objshl.Run "excel.exe",,True
    > > Set log = fso.OpenTextFile(textfile, 8)
    > > log.WriteLine "Excel stopped on " & Date
    > > log.WriteLine "Excel stopped at " & Time
    > > log.WriteLine "-- -- -- -- -- -- -- -- -- -- -- --"
    > > log.close()
    > > End Sub
    > >
    > > '**************************************
    > > 'Process tasks for option '3' selection
    > > '**************************************
    > > Sub Viewlogfile()
    > > Dim output, log
    > > Set log = fso.OpenTextFile(textfile, 1)
    > > If (fso.FileExists(textfile)) Then
    > > output = log.ReadAll
    > > log.Close
    > > MsgBox output
    > > Else
    > > MsgBox("The log file does not exist")
    > > End If
    > > End Sub
    > >
    > > '**************************************
    > > 'Process tasks for option '4' selection
    > > '**************************************
    > > Sub Deletelogfile()
    > > Dim confirm, file
    > > If Not (fso.FileExists(textfile)) Then
    > > MsgBox "There is no file to delete", 0
    > > Else
    > > confirm = MsgBox("Are you sure you wish to delete this?", 4, "Confirm
    > > Selection")
    > > If confirm = vbYes Then
    > > fso.DeleteFile textfile
    > > Set file = fso.OpenTextFile(textfile, 2, "true")
    > > file.WriteLine "Logfile created on " & Date & " at " & Time
    > > file.close
    > > End if
    > > End If
    > > End Sub
    >
    > I wouldn't call this recursion, but you want to keep running in the loop
    > until the user selects to quit. There must be several ways to do this, but I
    > remove the code before the Subs (except the call to mainmenu), then I would
    > revise Sub mainmenu as follow:
    > ===========
    > Sub mainmenu()
    > inputtest = "valid"
    > Do Until inputtest = "quit"
    > choice = (InputBox(("1. Run PowerPoint") _
    > & vbCrLf & ("2. Run Excel") _
    > & vbCrLf & ("3. View Log File") _
    > & vbCrLf & ("4. Delete Log File") _
    > & vbCrLf & ("5. Quit") _
    > & vbCrLf & vbCrLf _
    > & vbTab & vbTab & vbTab & "Choose By Number",title))
    >
    > Select Case choice
    > Case "1"
    > Logfile()
    > Powerpoint()
    > Case "2"
    > Logfile()
    > Excel()
    > Case "3"
    > Viewlogfile()
    > Case "4"
    > Deletelogfile()
    > Case "5"
    > inputtest = "quit"
    > Case Else
    > MsgBox("Your selection was not valid")
    > End Select
    > Loop
    > End Sub
    > ========
    > This worked for me.
    >
    > --
    > Richard Mueller
    > MVP Directory Services
    > Hilltop Lab - http://www.rlmueller.net
    > --
    >
    >
    >

      My System SpecsSystem Spec

  5. #5


    Vgolfmaster Guest

    Re: recursion help request

    Thanks as well Pegasus,

    Looks like you and Richard both had me led in the right direction - sorry
    that you both spent time on this and duplicated the effort but I'll gladly
    take more feedback as compared to none any day!




    "Pegasus [MVP]" wrote:

    >
    > "Vgolfmaster" <Vgolfmaster@xxxxxx> wrote in message
    > news:811E3A53-97D6-4C04-AD36-F3C6D1FDC10C@xxxxxx

    > >
    > > hi,
    > >
    > > I have a vbscript that I can not get to recurs properly. If the user
    > > enters
    > > '5' for input, the script should end. For ALL other input: invalid data
    > > returns to the inputbox (this works), and valid data should execute the
    > > corresponding sub-routines, and then return to the inputbox. I am unable
    > > to
    > > format this so far to get it to do this. I have tried loops and ended up
    > > with
    > > mostly endless loops. I have also tried to call (a 2nd call) the
    > > sub-procedure for the main menu (mainmenu()) at the end of the script, but
    > > it
    > > simply stops after the previous sub-routines finish. I have also tried to
    > > add
    > > the mainmenu() call at the end of each sub-routine for option 1thru4 to no
    > > avail, it still stops after each sub-routine.
    > >
    > > The inputbox and the use of subroutines for the selections 1-4 are
    > > required,
    > > so I can not re-write this entire thing. Any suggestions?
    > >
    > > the script:
    >
    > Your specification does not require a recursion - it requires a loop. Since
    > you expect a defined set of input response from the user, the program cries
    > out for a "Case Select" construct rather than a nested if-then-elseif set of
    > statements. Here is the main part of your program again. Please note that I
    > did not review or test the remainder of the code.
    >
    > '*************************
    > 'Main Processing Section *
    > '*************************
    > mainmenu()
    >
    > Do
    > Select Case choice
    > Case 1
    > program = "PowerPoint"
    > Logfile()
    > Powerpoint()
    > Case 2
    > program = "Excel"
    > Logfile()
    > Excel()
    > Case 3
    > Viewlogfile()
    > Case 4
    > Deletelogfile()
    > Case Else
    > WScript.quit
    > End Select
    > Loop
    >
    > '********************************************
    > 'Main Menu for player input and value testing
    > '********************************************
    > Sub mainmenu()
    > Do
    > choice = (InputBox(_
    > ("1. Run PowerPoint") & VbCrLf & _
    > ("2. Run Excel") & VbCrLf & _
    > ("3. View Log File") & VbCrLf &_
    > ("4. Delete Log File") & VbCrLf & _
    > ("5. Quit") & VbCrLf & VbCrLf & vbTab & vbTab & vbTab & _
    > "Choose By Number",title))
    > if IsNumeric(choice) then if (choice > 0) and (choice < 6) then Exit Do
    > MsgBox("Your selection was not valid")
    > Loop
    > End Sub
    >
    >
    >

      My System SpecsSystem Spec

  6. #6


    Pegasus [MVP] Guest

    Re: recursion help request


    "Vgolfmaster" <Vgolfmaster@xxxxxx> wrote in message
    news:26DD2FF5-6533-44F9-A31E-E593E2615E0B@xxxxxx

    > Thanks as well Pegasus,
    >
    > Looks like you and Richard both had me led in the right direction - sorry
    > that you both spent time on this and duplicated the effort but I'll gladly
    > take more feedback as compared to none any day!
    No apology required - it was pure coicidence that Richard and I looked at
    your post at much the same time.



      My System SpecsSystem Spec

recursion help request problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: file rename with folder recursion Mike Pfeiffer PowerShell 2 25 Sep 2009
Xml, Recursion and Base64 ajax76 PowerShell 2 08 Apr 2009
Xml and Recursion ajax76 PowerShell 0 08 Apr 2009
Xml, recursion and Ôase64 ajax76 PowerShell 0 08 Apr 2009
How do I limit subfolder recursion? Larry VB Script 4 08 Feb 2009