LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
bob bob is offline
external usenet poster
 
Posts: 16
Default delete part of a sheet

how would i delete part of a worksheet. the following deletes a worksheet
and copies new data to A1 but i want to leave the first 5 rows protected &
just delete the remaining rows in the sheet then copy source data to C6.


'delete data sheet each time before copy
Application.DisplayAlerts = False 'trun off del warning
Windows("test.xls").Activate
' Sheets("data").Visible = True 'unhide so can copy to
Sheets("data").Select
ActiveWindow.SelectedSheets.Delete
Application.DisplayAlerts = True 'trun warning back on
Windows("Book1").Activate
' COPY to test workbook , Data sheet, place at beginning
ActiveWorkbook.ActiveSheet.Copy Befo=Workbooks("test.xls").Sheets(1)
' Rename first sheet
Workbooks("test.xls").Sheets(1).Name = "data"


thanks


 
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
excel sheet bootom half sheet goes behind top part of sheet rob Excel Worksheet Functions 2 January 17th 09 01:28 AM
delete a - if it is the last part of a string deb Excel Discussion (Misc queries) 1 September 21st 08 01:18 AM
Delete part of a cell Francis Excel Worksheet Functions 5 February 1st 08 07:58 PM
delete part of a row based on certain criteria mark lane Excel Worksheet Functions 3 September 14th 06 01:16 AM
Delete part of a formula dee Excel Discussion (Misc queries) 6 April 28th 05 01:28 AM


All times are GMT +1. The time now is 03:05 PM.

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

About Us

"It's about Microsoft Excel"