Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-11-2011, 07:14 PM
rec rec is offline How to delete page not worksheet? Windows Vista How to delete page not worksheet? Office 2007
Novice
How to delete page not worksheet?
 
Join Date: Jun 2010
Location: Illinois
Posts: 22
rec is on a distinguished road
Default How to delete page not worksheet?

I can't figure out how to delete a page, not a worksheet, from a worksheet.
Reply With Quote
  #2  
Old 05-12-2011, 01:47 AM
OTPM OTPM is offline How to delete page not worksheet? Windows 7 32bit How to delete page not worksheet? Office 2010 32bit
Expert
 
Join Date: Apr 2011
Location: West Midlands
Posts: 981
OTPM is on a distinguished road
Default

Hi Rec

There is no concept of pages in a Spreadsheet that is why you are unable to do it. You would simply have to highlight the number of rows you wish to delete and then delete them.
Tony
Reply With Quote
  #3  
Old 05-20-2011, 02:32 AM
Catalin.B Catalin.B is offline How to delete page not worksheet? Windows Vista How to delete page not worksheet? Office 2007
Expert
 
Join Date: May 2011
Location: Iaşi, Romānia
Posts: 386
Catalin.B is on a distinguished road
Default

I guess you want to delete a worksheet from a workbook. (only sheet 1, for example). Simply right click on worksheet name and select Delete
Reply With Quote
  #4  
Old 05-20-2011, 09:19 AM
Catalin.B Catalin.B is offline How to delete page not worksheet? Windows Vista How to delete page not worksheet? Office 2007
Expert
 
Join Date: May 2011
Location: Iaşi, Romānia
Posts: 386
Catalin.B is on a distinguished road
Default

But if you insist, you can do it this waychange page break number as you need)

Sub DeletePage()
ActiveWindow.View = xlPageBreakPreview
Range(Rows(ActiveSheet.HPageBreaks(1).Location.Row ),Rows(ActiveSheet.HPageBreaks(2).Location.Row)).E ntireRow.Delete

End Sub
Reply With Quote
  #5  
Old 05-20-2011, 09:24 AM
Catalin.B Catalin.B is offline How to delete page not worksheet? Windows Vista How to delete page not worksheet? Office 2007
Expert
 
Join Date: May 2011
Location: Iaşi, Romānia
Posts: 386
Catalin.B is on a distinguished road
Default

But this method depends on page breaks, if you reset page breaks, you will delete another range than intended. My advice is to set another method to analize which rows to delete.
Reply With Quote
  #6  
Old 05-20-2011, 10:12 AM
Catalin.B Catalin.B is offline How to delete page not worksheet? Windows Vista How to delete page not worksheet? Office 2007
Expert
 
Join Date: May 2011
Location: Iaşi, Romānia
Posts: 386
Catalin.B is on a distinguished road
Default

Sorry, previous post deletes the second page AND the first row of the third page
This one works ok. ( from my point of view )
Sub DeletePage()

ActiveWindow.View = xlPageBreakPreview
Range(Rows(ActiveSheet.HPageBreaks(1).Location.Row ), Rows(ActiveSheet.HPageBreaks(2).Location.Row - 1)).EntireRow.Delete


End Sub
Reply With Quote
  #7  
Old 05-20-2011, 08:51 PM
macropod's Avatar
macropod macropod is offline How to delete page not worksheet? Windows 7 32bit How to delete page not worksheet? Office 2007
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by rec View Post
I can't figure out how to delete a page, not a worksheet, from a worksheet.
Select the range you want to delete, then choose Delete > Delete Cells and, depending on how you want the rest of the worksheet to be arranged after the deletion, 'Shift cells' either left or up.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Tags
delete a page



Similar Threads
Thread Thread Starter Forum Replies Last Post
delete email message via blackberry and have it delete on my pop3 and my outlook Iamthestorm Outlook 2 10-28-2010 12:21 AM
How to delete page not worksheet? Can I use a formula to name a worksheet? nolesca Excel 3 06-07-2010 04:02 PM
Unable to delete the last blank page. anandjeevakan Word 0 12-11-2009 05:20 AM
Printing multiple page worksheet with watermark zany Excel 2 11-27-2009 01:33 AM
How do you delete a blank page at end? aerophil Word 4 10-24-2009 05:04 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:43 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft