Dim flag As Boolean = FalseFor Each cm As object In ContextMenus If cm.name = "cell" Then flag = True Exit For End IfNext
msgbox(flag)