View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
hon123456 hon123456 is offline
external usenet poster
 
Posts: 31
Default Delete Row and Auto Subtract

Can I Change the code as follows:

Private Sub ActiveWorkbook.Worksheet2_BeforeRightClick( _
ByVal Target As Excel.Range, Cancel As Boolean)
If Target.Rows.Count < 1 Then Exit Sub
gRow = Target.Row
Call MakePopup("DC1") ' sets gSwCancel = True
Call MakePUButton("DC1", "DelRow", "Sheet2.DelRow")
Call MakePUButton("DC1", "True", "Sheet2.MenuTrue")
Call MakePUButton("DC1", "", "") ' begingroup
Call MakePUButton("DC1", "False", "Sheet2.MenuFalse")
Application.CommandBars("DC1").ShowPopup
Cancel = gSwCancel
End Sub


Thanks