I have below code is there any way I can resume code when its stop
Issue is when its stop I must download some WBK from internal portal due to some time links down/Connectivity/net work issue files took longer or sometimes it’s not taken 10 sec
Sub Fin_D()
Dim wb As Workbook
Dim c As Long
c = 2
For Each wb In Workbooks
If wb.Name = "Test File" Then c = c + 1
Next wb
MsgBox "Please Download " & c & " Number of WBK"
'Application.Wait (Now + TimeValue("0:00:15"))
Stop
Data_Fill
End Sub
Sub Data_Fill()
'some action is here along with long code
End Sub
But the code does pause when the message box is displayed, and it will only continue when the user has clicked OK. So you don't need to add anything else in the code.
yes it is, code does pause but there is some info on msgbox so user have to use some in house application to download those files which downloaded and open automatically.(these files will be downloaded from some other application not with excel or code)
due to msgbox those files are not open if user click ok on msgbox code turn into error.
one thing which I can use separate both code and make separate button in sheet but i am in search to avoid separate the codes.