Question : Add option before execute macro

Hi Experts,

I need Experts help. How to add a message box in the attached script and request user whether need to proceed or cancel the request? Hope Experts can help me to add this feature.

Sub CombineTT2sDelete()
transferTT2S
DeleteRows
End Sub



Answer : Add option before execute macro

Like so?
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
Sub CombineTT2sDelete()

Dim s As String

s = MsgBox("Continue?", vbYesNo)
If s = vbNo Then Exit Sub
transferTT2S
DeleteRows

End Sub
Random Solutions  
 
programming4us programming4us