Print Preview Input Range or From List

  • Thread starter Thread starter spurtniq
  • Start date Start date
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.
 
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
 
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 >
 
Back
Top