PDA

View Full Version : Group of Functions



kamalmalek
02-05-2020, 02:27 AM
Dear supporters,
i have some extraction files
normally when i run macro i treat these files and i have no issue
once running macro will do
if one case happen then msgbox "Check instructions" else job 1 job 2 job 3 job 4 job 5 job 6 job 7 job 8 job 9 job 10 etc...... end if


now what i need to do 2 choices in Msgbox as following
Dim answer As Integer
if one case happen then MsgBox("Do you want to continue",vbQuestion+vbYesNo+vbDefaultButton2,"Check instructions")




1
2
3
4
5

If answer=vbYes Then
job 1 job 2 job 3 job 4 job 5 job 6 job 7 job 8 job 9 job 10 etc......
Else
MsgBox"review files"
End If




else job 1 job 2 job 3 job 4 job 5 job 6 job 7 job 8 job 9 job 10 etc...... end if





if you see i repeat job 1 job 2 job 3 job 4 job 5 job 6 job 7 job 8 job 9 job 10 twice
i want same idea AND put the job 1 job 2 job 3 job 4 job 5 job 6 job 7 job 8 job 9 job 10 one time only.....

SamT
02-05-2020, 09:31 AM
Sub JobControler()
job 1
job 2
job 3
job 4
job 5
'Etc
End Sub


If answer=vbYes Then
JobControler
Else
MsgBox"review files"
End If