Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Thanks - I cleaned it up quite a bit and it is doing 99% of what I wan to. Thanks so much for the help, I really appreciate it. Private Sub CommandButton7_Click() Dim varAnswer As String varAnswer = MsgBox("Are you certain you wish to proceed? This canno be undone." & Chr(10) & Chr(10) & "Edits to this workbook my only b entered into your Data Sheet manually once the current data i compiled.", vbOKCancel) If varAnswer = vbCancel Then Exit Sub End If Dim Lrow As Long Dim CalcMode As Long Dim StartRow As Long Dim EndRow As Long With Worksheets("ws1") .DisplayPageBreaks = False StartRow = 2 EndRow = 21 For Lrow = EndRow To StartRow Step -1 If IsError(.Cells(Lrow, "a").Value) Then 'Do nothing, This avoid a error if there is a error in the cell ElseIf .Cells(Lrow, "A").Value <= " " Then .Rows(Lrow).Delete 'This will delete the row if the cell is empty End If Worksheets("ws1").Range("a2:m21").copy Next MsgBox ("Your inspection data for this worksheet has been compiled. Please go immeditately to the current version of you Dat Sheet/PivotTable to import this data.") End With End Sub -- BigDav ----------------------------------------------------------------------- BigDave's Profile: http://www.excelforum.com/member.php...nfo&userid=774 View this thread: http://www.excelforum.com/showthread.php?threadid=37986 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
clean up code a little | Excel Discussion (Misc queries) | |||
I need to clean a database | Excel Discussion (Misc queries) | |||
Clean Up Data | Excel Discussion (Misc queries) | |||
Help clean up this code... | Excel Programming | |||
=clean(a1) | Excel Programming |