Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Public WithEvents xlWbk As Workbook
Private Sub xlWbk_SheetBeforeRightClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean)
Cancel = True
If MsgBox("Do you want to stop(break) the code", vbYesNo + vbExclamation, "a code is running") = vbYes Then
Set Me.xlWbk = Nothing
End
' 'Stop' to break the code
' however, xlWbk object has to be handled differently
End If
End Sub
Sub EndlessLoop()
Set ThisWorkbook.xlWbk = ThisWorkbook
Do
DoEvents
Loop
End Sub