How can I modify the below code to run on worksheet "Week1" instead of the 4th worksheet in?
Code:
Sub RemoveColWeek1sheet()
Dim ColNo As Integer
Dim rng As Range
'The range below specifies the worksheet from count order of left to right
'Need to change this
Set rng = ThisWorkbook.Sheets(4).UsedRange
For ColNo = rng.Columns.Count To 1 Step -1
Select Case rng.Cells(1, ColNo)
Case "Date", "Account", "Stock", "known"
'Take No Action
Case Else 'Delete the Column
rng.Columns(ColNo).Delete
End Select
Next ColNo
End Sub