Thread
:
macro for order forms
View Single Post
#
5
Posted to microsoft.public.excel.programming
Anders S
external usenet poster
Posts: 35
macro for order forms
Jim,
The original macro just hides rows in the used range, the unused 60,000+ rows will not print anyway, so I didn't bother about them.
If you must hide *all* empty rows, you can try the addition below.
'-----
Sub hideRows()
On Error GoTo hExit
Range("H:H").SpecialCells(xlCellTypeBlanks).Entire Row.Hidden = True
Range(Rows(Cells(Rows.Count, "H").End(xlUp).Row + 1), _
Rows(Rows.Count)).EntireRow.Hidden = True
hExit:
End Sub
'-----
Regards,
Anders Silvén
"onedaywhen" skrev i meddelandet om...
This didn't work for me. When I had non-blank values in H:H it hid the
blank rows up to the last non-blank cell and none beyond. When I had
all blank values in H:H I got a run-time error.
"Anders S" <anders
wrote in message ...
Jim,
Another way (with the units in column H),
'-----
Option Explicit
Sub hideRows()
Range("H:H").SpecialCells(xlCellTypeBlanks).Entire Row.Hidden =
True
End Sub
Sub showRows()
Rows.Hidden = False
End Sub
'-----
HTH
Anders Silv n
"jbarber" skrev i meddelandet
...
Hi everyone
It is my first post here. Ive been consulting this site and it is very
helpful and Ive learned numerous relevant tips.
I want to set up an Order Form (with all items, price etc) but this
document is HUGO (more than 1000 items) and it's a pain in the back to
print.
I need to build a macro that will check every line (to see if there's
anything ordered) and where ever there is units (to keep it) and where
there's no unit, simply hide or delete the row..
let me know if this make any sens
any help would be greatly appreciated
thank you very much in advance..
jim barber
------------------------------------------------
~~ Message posted from
http://www.ExcelTip.com/
~~View and post usenet messages directly from
http://www.ExcelForum.com/
Reply With Quote
Anders S
View Public Profile
Find all posts by Anders S