I need to make sub commands in a commandbarcontrol popmenu that I made. I can make the sub menu items fine...but I can't connect to the commandevents class. I have tried using Dim hndl As CommandBarEvents hndl = CType(Me.m_objDTE.Events.CommandBarEvents(menuItem), EnvDTE.CommandBarEvents) but I get an invalid cas type