PDA

View Full Version : [SOLVED:] inputbox - skip step and continue with loop



smakatura
08-08-2023, 10:19 AM
I want to pull data from a document - document/location saved as variable name FullPullFromPPTFileName.

generally I want to

start with one file
do yes - individual actions as below
change FullPullFromPPTFileName to next document and repeat process


my desired steps are

check to see if document exists in folder

yes - exists

individual actions will be added later...
reset value of FullPullFromPPTFileName variable and start again with the new document


no - does not exist

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






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

June7
08-08-2023, 10:27 AM
If MsgBox("Do you want to load file?") = vbYes Then
'code to process file
End If

smakatura
08-09-2023, 09:58 AM
thanks. I figured it would be simple.