Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / February 2007

Tip: Looking for answers? Try searching our database.

Print routine needed for code

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
pano - 11 Feb 2007 07:35 GMT
Hi I hope someone can help me with this I want to run this on a sheet
carlog before printing but I cant work out how to put the print
routine in, anyone!!!!

Sub HideRows()
Dim i As Long
Application.ScreenUpdating = False
For i = 10 To 44
For j = 10 To 44
   If Range("A" & i).Value = "" Then
       Range("A" & i).EntireRow.Hidden = True
       End If
If Range("b" & j).Value = 0 Then
       Range("b" & j).EntireRow.Hidden = True
   End If
Next 'i
Next 'j

Application.ScreenUpdating = True

End Sub
Mike - 11 Feb 2007 10:57 GMT
If the macro does what you want then put it in the 'Before print, event.

Double click this workbook in VB editor. Select workbook from the dropdown
and then 'before print' from the other dropdown and paste your code in.

Mike

> Hi I hope someone can help me with this I want to run this on a sheet
> carlog before printing but I cant work out how to put the print
[quoted text clipped - 17 lines]
>
> End Sub
pano - 11 Feb 2007 12:01 GMT
> If the macro does what you want then put it in the 'Before print, event.
>
[quoted text clipped - 26 lines]
>
> - Show quoted text -

Thanks for that
Don Guillett - 11 Feb 2007 14:27 GMT
See my ans in your OTHER POST. Pls do NOT do that.

Signature

Don Guillett
SalesAid Software
dguillett1@austin.rr.com

>> If the macro does what you want then put it in the 'Before print, event.
>>
[quoted text clipped - 29 lines]
>
> Thanks for that
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.