View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
mangesh_yadav[_350_] mangesh_yadav[_350_] is offline
external usenet poster
 
Posts: 1
Default Help with If/then macro in VBA


Insert a commanbutton from the Control ToolBox menu. And attach the
following code:

Private Sub CommandButton1_Click()

Range("B11") = Range("B11") - 2
If Range("B11") < 1 Then
Range("B11").EntireRow.Delete
Range("B11") = Range("B11") - 2
End If

End Sub


Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=380628