MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Script for Deleting Cols from a SS


Posted by Conor on October 26, 2001 12:39 AM

Hello all,

Can anyone provide me with a VB script to delete cols b,e,h in a SS

Hence leaving me with my same data but three cols less???

Thanks advance,
Conor


Posted by Tom Urtis on October 26, 2001 1:06 AM

I don't know what an SS is (besides it being the prefix to the name of a boat), but here are the lines of code you asked about:

Sheets("YourSheetName").Range _("B:B,E:E,H:H").Select
Selection.Delete Shift:=xlToLeft

HTH = Hope this helps

Tom Urtis

Posted by conor on October 26, 2001 1:12 AM

SS is an abbr(abbreviation) for SpreadSheet!!

Thanks for your help


but here are the lines of code you asked about:

Posted by Tom Urtis on October 26, 2001 1:26 AM

I figured that SS part but couldn't resist.

Hey Conor, I notice that the script in my code as it appears on the board shows a space and an underscore after the word Range. Those should not be there, they denote a carriage return line but when on the same actual line should be absent...just in case you experience any difficulty with this code after you plug it into your module.

Tom U.

but here are the lines of code you asked about