Print Preview Input Range or From List

S

spurtniq

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.
 
R

Ron de Bruin

One way

On a empty sheet

Insert >Name>Paste
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
 
K

keepitcool

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 >
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top