Public Sub DeleteAllAppended() If MsgBox("Are you sure? This will delete every report you have added.", vbOKCancel) = vbCancel Then Exit Sub End If Dim nRow As Long Dim nStart As Long, nEnd As Long 'Figure out where Appened Reports starts. For nRow = 1 To 1048576 If Range("A" & nRow).Value = "Created by:" Then nStart = nRow Exit For End If Next nRow nStart = nStart + 2 ' Figure out where Appened Reports end. For nRow = nStart To 1048576 If Range("A" & nRow).Value = "Totals" Then nEnd = nRow Exit For End If Next nRow nEnd = nEnd - 1 Range("A" & nStart & ":I" & nEnd).Delete End Sub
|ADD New Entries||7||16|
|Excel VBA - reference a textbox on a userform using a variable dynamically||2||25|
|Delete all charts except for two charts with a specific name using VBA||8||17|
|Excel range I cannot find||8||20|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
16 Experts available now in Live!