|
コマンドボタンクリックイベント
Private Sub CommandButton1_Click()
Dim toprow As Long
Dim bottomrow As Long
'終了する行
toprow = 8
'開始する行
bottomrow = 30
For i = bottomrow To toprow Step -1
If ActiveSheet.Cells(i, 1) = "" Then
'A列が空白なら行削除
Application.Rows(i).Delete
End If
Next
End Sub
|
|