Delete coloum in VB

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.
 
M

Mike H

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
 
G

Gord Dibben

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
 
Top