Hi, I built the below to be able to clear data on various worksheets starting just below the main header line. What I am missing is how to be able to start the clear in a different cell/Column on each sheet. Meaning on one sheet the clear starts in B11 and on others it might start in C2. All the Headers start in Row 10 and all Data starts on row 11.
Global Code is below to show where the Headers are and where the Data starts
The Clear Data info
Thank you for any guidance.
Global Code is below to show where the Headers are and where the Data starts
VBA Code:
Option Explicit
Public Const rowHeaderInstall As Long = 10
Public Const rowDataStartInstall As Long = 11
Public headerInstall As Range
Public rowDataEnd Install As Long
Public wsInstall
Public rInstall As Range
The Clear Data info
VBA Code:
Option Explicit
Sub Clear_Install
Set wsInstall = Worksheets("Install")
If msgBox("Are you sure you want to clear all the data on " & wsInstall.Name & "???", vbQuestion + vbYesNo + vbDefaultButton2, "Clear " & wsInstall.Name) = vbNo Then Exit Sub
With wsInstall
Range (.Rows(rowDataStartInstall), .Rows(.UsedRange.Rows.Count)).ClearContents
End With
End Sub
Thank you for any guidance.