#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Delete coloum in VB

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.

--
Sincerely Yours
Haviv
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Delete coloum in VB

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

"haviv" wrote:

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.

--
Sincerely Yours
Haviv

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Delete coloum in VB

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

On Thu, 11 Sep 2008 00:21:01 -0700, haviv
wrote:

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.


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Delete coloum in VB

Hi Thank you very much its working.
--
Sincerely Yours
Haviv


"Mike H" wrote:

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

"haviv" wrote:

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.

--
Sincerely Yours
Haviv

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Question on how to raise a price 15% in a coloum cindyred Excel Discussion (Misc queries) 11 November 15th 07 04:29 PM
how to change coloum to row sangeet Excel Worksheet Functions 5 June 4th 07 04:13 PM
Regonise coloum A while adding up coloum B to give a result in C B.H.JIG Excel Discussion (Misc queries) 3 May 3rd 07 01:25 PM
Need to import data to a coloum not a row Russ M. Excel Discussion (Misc queries) 1 November 22nd 05 08:40 PM
Chart Coloum Labels - Very Urgent Ian B Charts and Charting in Excel 4 September 18th 05 07:01 PM


All times are GMT +1. The time now is 03:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"