Consulting

Results 1 to 3 of 3

Thread: inputbox - skip step and continue with loop

  1. #1

    inputbox - skip step and continue with loop

    I want to pull data from a document - document/location saved as variable name FullPullFromPPTFileName.

    generally I want to
    1. start with one file
    2. do yes - individual actions as below
    3. change FullPullFromPPTFileName to next document and repeat process


    my desired steps are
    1. check to see if document exists in folder
      1. yes - exists
        1. individual actions will be added later...
        2. reset value of FullPullFromPPTFileName variable and start again with the new document

      2. no - does not exist
        1. ask user if they want to load file or skip this step
          1. load file
            1. let user load file
            2. user hits an option "reload file"
            3. recheck if file is in folder (start loop over again)

          2. skip step
            1. user hits option of "skip document"
            2. reset value of FullPullFromPPTFileName variable and start again with the new document


    This is the part I need help on

    If Dir(FullPullFromPPTFileName) <> "" Then    
            'actions - to be added later
            
         Else:
            '***** This is the part I am not sure about***
            'ask user if they want to load file or skip this step
                'Load file
                    'let user load file
                    'user hits an option "reload file"
                    'recheck if file is in folder (start loop over again)
                'Skip step
                    'user hits option of "skip document"
                    'reset value of FullPullFromPPTFileName variable and start again with the new document
    
    End If


  2. #2
    VBAX Mentor
    Joined
    Nov 2022
    Location
    The Great Land
    Posts
    337
    Location
    If MsgBox("Do you want to load file?") = vbYes Then
    'code to process file
    End If
    How to attach file: Reading and Posting Messages (vbaexpress.com), click Go Advanced below post edit window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    thanks. I figured it would be simple.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •