#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 93
Default Set print area

i had to use printout instead of print
and the addl code didn't seem to work...long time user, but new to macros

thanks

"Don Guillett" wrote:


.print
instead of
.printpreview

Sub dist_sort()
' myrow = InputBox("row number")

'or maybe this is better
myrow=cells(rows.count,"a").end(xlup).row 'last row in col A
Range("a8:ac" & myrow).Sort Key1:=Range("H8"), Order1:=xlAscending
end sub


--
Don Guillett
SalesAid Software

"reno" wrote in message
...
Thanks, two add'l questions...can this be changed to Print instead of
PrintPreview to save time?

Second, can you code be added to this sorting macro?
Sub dist_sort()
'
' dist_sort Macro
' Macro recorded 1/23/2007 by Bob Bridwell
'
' Keyboard Shortcut: Ctrl+Shift+Q
'
Range("A8:AC113").Select
ActiveWindow.SmallScroll Down:=-102
ActiveWindow.SmallScroll ToRight:=-4
Selection.Sort Key1:=Range("H8"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
end sub

and it doesn't get much easier!!

"Don Guillett" wrote:

Is this easy enough?

Sub printwhatarea()
myrow = InputBox("row number")
Range("a2:f" & myrow).PrintPreview
End Sub

--
Don Guillett
SalesAid Software

"reno" wrote in message
...
i got no takers first time.
i have a worksheet that lists all zipcodes w/in a specified radius 5,
10,
15
20 and 25 miles, then a run a macro to place them in ascending order,
then
i
want to print only the sorted data that meet the spec.

in some cases it could be one or upwards of 100 or so that would run to
two
pages.

if i were to do a calculation to put say an "x" in the far right column
to
indicate the lower right of the print range, is there a way a macro
could
print from A1: "x", w/out having to highlight each and every
time...there
are
about 50 sheets to print.
thanks






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
Print Area Jeff Excel Discussion (Misc queries) 2 March 28th 06 05:39 PM
add row to Print Area Noemi Excel Discussion (Misc queries) 1 January 30th 06 01:23 AM
Active cell counting in particular print page (one sheet having different print area) ananthmca2004 Excel Worksheet Functions 1 November 24th 05 11:29 AM
How do you turn off a print area for a page? (no print area) Grunen Excel Discussion (Misc queries) 4 October 8th 05 07:46 PM
Can't Clear Print Area GeorgeF Excel Discussion (Misc queries) 2 August 5th 05 06:10 PM


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