Hello,
A quick question I am wondering if somebody can answer. I have a range of workbooks each with 24 Sheets.
I want to delete a specific set of cells with in each worksheet within each workbook - A10015 to AC10254
I have tried two options - but neither seems to work on all sheets in the workbook:
Sub Deleteafter9999()
'
' Deleteafter9999 Macro
' delete after 9999
'
'
Dim ws As Worksheet
For Each ws In Worksheets
With ws.Sort
Rows("10015:10255").Select
Selection.ClearContents
End With
Next ws
End Sub
and also
Sub stone()
Dim a As Long
For a = 1 To Sheets.Count
Worksheets(a).Range("A210015:AC10255").ClearContents
Next a
MsgBox "Complete"
End Sub
Any comments / suggestions welcome.
Thanks
A quick question I am wondering if somebody can answer. I have a range of workbooks each with 24 Sheets.
I want to delete a specific set of cells with in each worksheet within each workbook - A10015 to AC10254
I have tried two options - but neither seems to work on all sheets in the workbook:
Sub Deleteafter9999()
'
' Deleteafter9999 Macro
' delete after 9999
'
'
Dim ws As Worksheet
For Each ws In Worksheets
With ws.Sort
Rows("10015:10255").Select
Selection.ClearContents
End With
Next ws
End Sub
and also
Sub stone()
Dim a As Long
For a = 1 To Sheets.Count
Worksheets(a).Range("A210015:AC10255").ClearContents
Next a
MsgBox "Complete"
End Sub
Any comments / suggestions welcome.
Thanks