Using Excel VBA to capture edit mode through checking the standard tool bar
- by srimal
I'm using this code to check if the standard toolbar is deactivated in the edit mode.
CommandBarControl oNewMenu = Application.CommandBars("Worksheet Menu Bar").FindControl(1, 18, 1, True, True)
If (IsNull(oNewMenu)) Then
MsgBox "Edit mode enabled"
End If
but the FindControl function raise an error. Is there any conflict in the parameters?