Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Print Preview Input Range or From List

I'd like to setup a macro (for now) that either:

Allows me to use an input box to type in a range name
which is then sent to Print Preview

or

Allows me select a range name from a list, such as

Range Names:

Pg_1
Pg_2
Pg_3
etc

and then would likewise send the range to
Print Preview

These ranges are spread out across several worksheets
so, selection of the range would have to take that into account as
well.

I thought this wouldn't be too difficult, but, I've been working on
this for a few days now with no luck.

Thanx.



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Print Preview Input Range or From List

One way

On a empty sheet

Insert NamePaste
Paste list

You can use this macro when you have select a name in the A column

Sub test()
On Error Resume Next
Range(ActiveCell.Value).PrintPreview
On Error GoTo 0
End Sub


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"spurtniq" wrote in message ...
I'd like to setup a macro (for now) that either:

Allows me to use an input box to type in a range name
which is then sent to Print Preview

or

Allows me select a range name from a list, such as

Range Names:

Pg_1
Pg_2
Pg_3
etc

and then would likewise send the range to
Print Preview

These ranges are spread out across several worksheets
so, selection of the range would have to take that into account as
well.

I thought this wouldn't be too difficult, but, I've been working on
this for a few days now with no luck.

Thanx.



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Print Preview Input Range or From List


spurtnic,

this aint perfect, but it'll do what you want:

Sub GoAndPreView()
if Application.Dialogs(xlDialogFormulaGoto).Show then
ActiveSheet.PageSetup.PrintArea = Selection.Address
ActiveSheet.PrintPreview
endif
End Sub


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


spurtniq wrote:

I'd like to setup a macro (for now) that either:

Allows me to use an input box to type in a range name
which is then sent to Print Preview

or

Allows me select a range name from a list, such as

Range Names:

Pg_1
Pg_2
Pg_3
etc

and then would likewise send the range to
Print Preview

These ranges are spread out across several worksheets
so, selection of the range would have to take that into account as
well.

I thought this wouldn't be too difficult, but, I've been working on
this for a few days now with no luck.

Thanx.



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from

http://www.ExcelForum.com/



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Print Preview Input Range or From List

Both solutions!

Thank you very much!



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

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
List Box - For Input Range can I use named range in another workbo dim Excel Worksheet Functions 2 January 3rd 08 06:10 PM
print preview v page break preview SamB Excel Discussion (Misc queries) 0 November 16th 06 05:09 PM
Print Blank Pgs - Preview margins outside print range dsm Excel Discussion (Misc queries) 0 October 25th 06 06:17 PM
Input Range for a List Box sca723 Excel Worksheet Functions 1 November 11th 05 03:15 PM
input range in drop down list Otto Excel Discussion (Misc queries) 3 July 27th 05 09:09 PM


All times are GMT +1. The time now is 06:27 AM.

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"