Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default Hidden rows reappearinmg when macro deletes rows

My Excel 2003 worksheet has rows and columns outside the work area hidden.

I have a macro that deletes rows that do not contain anything in the first
cell and other specific criteria.

When the macro has finished I have new blank rows appearing at the end of
the work area, replacing those that have been deleted, ending with row number
31815.

Is there a way to keep these rows hidden?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 586
Default Hidden rows reappearinmg when macro deletes rows

Are you actually deleting the row or are you just clearing contents? I find
it odd that rows are just magically reappearing. You should post your code
so we can see what possible problems there are.
--
Cheers,
Ryan


"Code Numpty" wrote:

My Excel 2003 worksheet has rows and columns outside the work area hidden.

I have a macro that deletes rows that do not contain anything in the first
cell and other specific criteria.

When the macro has finished I have new blank rows appearing at the end of
the work area, replacing those that have been deleted, ending with row number
31815.

Is there a way to keep these rows hidden?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default Hidden rows reappearing when macro deletes rows

Hi Ryan, I am deleting rows. Code follows between the dotted lines (lots of
it). Grateful for any advice on this.

-----------------------------------------------------------------------------
Sub Quote_Wrapup()
'To stop screen flicker
Application.ScreenUpdating = False

Sheet1.Range("quote_date") = Sheet1.Range("quote_date").Value
Range("qdata5,qdata6").Font.ColorIndex = 2

'To delete delivery address lines if 1st line empty
If IsEmpty(Range("deliver_line1")) _
Then Sheets(1).Range("deliver_rows").EntireRow.Delete
'No End If required as only one action as a result of the If

Range("Item_Nos").SpecialCells(xlCellTypeBlanks).E ntireRow.Delete
Sheet1.Range("content") = Sheet1.Range("content").Value

Call NoDVinputMsg

ActiveSheet.Shapes("Group 31").Delete
Rows("1:1").Delete Shift:=xlUp
ActiveSheet.Shapes("Picture 14").Delete
Range("A:G").Interior.ColorIndex = xlNone

'Desperately trying to speed up delete column E!
Application.Calculation = xlCalculationManual
Application.EnableEvents = False
ActiveSheet.Range("base_p").Delete Shift:=xlToLeft
Application.EnableEvents = True
Application.Calculation = xlCalculationAutomatic

Range("comm_disclines").Delete Shift:=xlUp
Range("boxes").Borders.LineStyle = x1None
Range("delterms_box").ClearContents
Sheets("Instructions").Select
ActiveSheet.Name = "Terms&Conditions"
Range("instructions").Delete
ActiveSheet.Shapes("Object 1").Delete
Range("A1").Select
Sheets("Quotation").Select
Range("qdata1").Select
Dim vbCom As Object

Call logquote
Application.ScreenUpdating = True

Range("A1:F1").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.MergeCells = True
End With


On Error Resume Next

Set vbCom = ActiveWorkbook.VBProject.VBComponents

vbCom.Remove VBComponent:= _
vbCom.Item("Module3")

vbCom.Remove VBComponent:= _
vbCom.Item("Module4")

On Error GoTo 0

End Sub
-----------------------------------------------------------------------------
This is the line which may delete up to 250 rows
- - - - - - - - - - - - - - - - - - -
- - - - -
Range("Item_Nos").SpecialCells(xlCellTypeBlanks).E ntireRow.Delete
- - - - - - - - - - - - - - - - - - -
- - - - -

"RyanH" wrote:

Are you actually deleting the row or are you just clearing contents? I find
it odd that rows are just magically reappearing. You should post your code
so we can see what possible problems there are.
--
Cheers,
Ryan


"Code Numpty" wrote:

My Excel 2003 worksheet has rows and columns outside the work area hidden.

I have a macro that deletes rows that do not contain anything in the first
cell and other specific criteria.

When the macro has finished I have new blank rows appearing at the end of
the work area, replacing those that have been deleted, ending with row number
31815.

Is there a way to keep these rows hidden?

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
Macro code to hide rows and not calculate hidden rows bradmcq Excel Discussion (Misc queries) 0 September 1st 09 12:38 AM
Macro That Deletes Rows Extremely Slow LarryP Excel Programming 6 December 13th 07 07:26 PM
Macro that Deletes All rows except first row curtney Excel Programming 2 July 18th 06 06:22 PM
Macro that deletes certain rows only supamari0 Excel Programming 7 June 9th 06 04:11 PM
Macro that deletes certain rows and not others Roger[_20_] Excel Programming 8 May 3rd 05 12:02 AM


All times are GMT +1. The time now is 06:55 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"