Posted to microsoft.public.excel.programming
|
|
To print multiple selection and how to back VBA module pasword
Ron
what's "paste picture Link" ?
Regards
Trevor
"Ron de Bruin" wrote in message
...
1) i am facing problem of printing multiple selction in the one excell
sheet or it may be consist of more than one sheet selection for print.
Is it possible to set multiple print areas?
Try this from Dave Peterson
You could do this
Insert a new worksheet (you're gonna use this for printing).
Do this for each area in your range.
select the range
Edit|copy
go to the new worksheet and Shift-click-Edit|Paste Picture Link.
go back and do the rest of the areas (copy|shift-click-Edit|paste picture
Link).
What's neat about the picture is that if you change the original, the
picture
will change, too (values and formatting!).
You could keep that new worksheet forever--just for printing--but if the
ranges
change, you'll have a little work to do.
Or this
One way to print your selection with more areas on
one Page.
It will add a sheet and copy the selection areas on it
And delete that sheet after printing
Sub test()
Dim destrange As Range
Dim smallrng As Range
Dim newsh As Worksheet
Dim Ash As Worksheet
Set Ash = ActiveSheet
Set newsh = Worksheets.Add
Ash.Select
Set destrange = newsh.Cells(LastRow(newsh) + 1, 1)
For Each smallrng In Selection.Areas
smallrng.Copy
destrange.PasteSpecial xlPasteValues
Set destrange = newsh.Cells(LastRow(newsh) + 1, 1)
Next smallrng
newsh.PrintOut
Application.DisplayAlerts = False
newsh.Delete
Application.DisplayAlerts = True
End Sub
Public Function LastRow(sh As Worksheet)
On Error Resume Next
LastRow = sh.Cells.Find(What:="*", _
After:=sh.Range("A1"), _
Lookat:=xlPart, _
LookIn:=xlFormulas, _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious, _
MatchCase:=False).Row
On Error GoTo 0
End Function
--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl
"Kamran Khatri" wrote in message
m...
Dear guys!
1) i am facing problem of printing multiple selction in the one excell
sheet or it may be consist of more than one sheet selection for print.
Is it possible to set multiple print areas?
2) How can i print the sum of any field at the bottom of the page in
excell like Access can print in Page Footer Option.
3) How can i retrive my VBA forgotten Pasword?
Your answers will be highly appreciated
|