View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
GBExcel via OfficeKB.com GBExcel via OfficeKB.com is offline
external usenet poster
 
Posts: 26
Default Do not delete row with cell in Column B = 0

Hi Ryan,

Appreciate the reply.

The line

RowNdx = Application.InputBox(Prompt:="Enter the number of the row you
want to delete")

produces an 'Expression expected.' error message?

I'm afraid I don't know enough about VBA to solve this.

GBExcel
=========

Ryan H wrote:
Try this. Hope this helps! If so, let me know, click "YES" below.

Dim RowNdx As Variant

RowNdx = Application.InputBox(Prompt:="Enter the number of the row you
want to delete")

If RowNdx = False Then
Exit Sub
ElseIf IsNumeric(RowNdx) And RowNdx 0 And _
RowNdx <= Rows.Count And Cells(RowNdx, "B") < "0" Then
Rows(RowNdx).Delete
Else
MsgBox "Stop! You may not delete the footer row.", vbCritical
End If

Hi,

[quoted text clipped - 34 lines]

GBExcel


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/201001/1