Jul 31 2018 07:21 AM
Excel 2016 Help window pops up automatically when I call Msgbox. I have called the Msgbox in the Worksheet_Activate function. Immediately after the Msbox is displayed, along with Msgbox, Excel 2016 Help Window also opens.
I do not want "Excel 2016 Help" window to pop automatically. Is there solution to avoid this.
Jul 31 2018 08:09 AM
Jul 31 2018 08:20 AM - edited Jul 31 2018 08:23 AM
Please find function attached. When worksheet is activated, I call the Msgbox. If I remove Msgbox , I don't get the Excel 2016 Help window,
**************************************
Dim MsgSW2 As Boolean
Private Sub Worksheet_Activate()
If MsgSW2 Then Exit Sub
If Range("CatchSW").Value = False Then
MsgBox "Please remember to update the data in the Section"
MsgSW2 = True
CommandButton1.Visible = True
Else
CommandButton1.Visible = False
End If
End Sub
******************************************
Jul 31 2018 09:27 AM
This is a strange issue!
I tried to reproduce the code on my own but the Excel 2016 help window didn't pop up!
Typically, it pops up when you press F1.
Jul 31 2018 09:32 AM
Jul 31 2018 11:35 AM
Is there is setting in excel which will prevent "Excel 2016 Help" window popping up.
Jul 31 2018 08:06 PM
Sorry, I have no idea about that!
But, try to update the code as follows:
Dim MsgSW2 As Boolean
Private Sub Worksheet_Activate()
If MsgSW2 Then Exit Sub
Application.DisplayAlerts = False
Application.EnableEvents = False
If Range("CatchSW").Value = False Then
MsgBox "Please remember to update the data in the Section"
MsgSW2 = True
CommandButton1.Visible = True
Else
CommandButton1.Visible = False
End If
Application.DisplayAlerts = True
Application.EnableEvents = True
End Sub
This might fix the issue!
Regards
Aug 01 2018 08:18 AM
Thanks Haytham for your response.
I tried the code shared by you. But I still get the pop up. I also did try to place the DisplayAlerts and Enable events in different places , but still getting the error.