Delete coloum in VB

  • Thread starter Thread starter haviv
  • Start date Start date
H

haviv

Hi I have an excel table contain 29 sheets. I need to delete the entire
coloum of CA to ET in all sheets. Is there anyone could help me generate the
VB code.
 
Hi,

Try this but be careful it will delete that range in every sheet in the
workbook. Is that what you want?

Sub versive()
Dim ws As Worksheet
For x = 1 To Worksheets.Count
Sheets(x).Range("CA:ET").EntireColumn.Delete
Next
End Sub

Mike
 
Sub delete_cols()
Application.ScreenUpdating = False
Dim N As Single
For N = 1 To Sheets.Count
Sheets(N).Columns("CA:ET").Delete
Next N
Application.ScreenUpdating = True
End Sub


Gord Dibben MS Excel MVP
 
Back
Top