Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Deleting a Column

In a macro in workbook A I am trying to delete column A in
workbook SOA.xls. This code doesn't seem to work.

Windows("SOA.xls").Columns("A").Delete

What is worng with this syntax?

TIA.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 170
Default Deleting a Column

What sheet? Workbooks or Windows don't have a Columns collection for you
delete anything from. Worksheets do.

Workbooks("SOA.xls").ActiveSheet.Columns("A").Dele te
Workbooks("SOA.xls").Worksheets(1).Columns("A").De lete
Workbooks("SOA.xls").Worksheets("Sheet 1").Columns("A").Delete

should all work
--
George Nicholson

Remove 'Junk' from return address.


"Ken" wrote in message
...
In a macro in workbook A I am trying to delete column A in
workbook SOA.xls. This code doesn't seem to work.

Windows("SOA.xls").Columns("A").Delete

What is worng with this syntax?

TIA.



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
Deleting every nth through every nth row in a column Chris Excel Discussion (Misc queries) 1 July 9th 06 09:23 AM
Deleting nth row or column tarunpathria Excel Discussion (Misc queries) 1 February 15th 06 10:36 AM
Deleting a column reena Excel Discussion (Misc queries) 4 February 15th 06 06:45 AM
Deleting content in a column JamesBL Excel Worksheet Functions 1 November 2nd 04 02:21 AM
Deleting a row with 0 in column A Steven R. Berke Excel Programming 1 October 2nd 03 01:37 AM


All times are GMT +1. The time now is 10:24 PM.

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"