How to printout only selected rows and columns

G

Gina Meyer

Hi all.

here's my problem:

I have a sheet with headers: first name, surname, address1, address2,
someotherstuff
I would like to select some rows (continous) and appropriate columns
(continous) and get a simple printout of the selected data. ... for now
Later I would like to fomat this data in order to get proper labels as
prints.

I am sorry ... I haven't a clou how to start this reasonably and would
appreciate your help !!

TIA

Gina
 
G

Guest

Under FILE on the menu, choose PAGE SETUP > Sheet. You should see two
options: "Rows to repeat at top" & "Columns to repeat at left" I have not
used the row option, buth if the headers were in column A, I would put A:A in
the Column option. Then highlight what continues columns I wanted to print
and the appropriote headers in column A would print. Maybe you just have to
enter 1 for the Row if you want row 1 to print as stated.

Les
 
G

Gina M.

Hi Pilot.

Thanks for your answer .... but unfortunately it is not what I need in this
case, I think
what I have tried so far is:

***********
Sub PrintMySelection()
Dim strTopLeft, strEndRight As String

strTopLeft = "$A$2"
strEndRight = "$E$3"
ActiveSheet.PageSetup.PrintArea = strTopLeft & ":" & strEndRight
ActiveSheet.PrintOut
ActiveSheet.PageSetup.PrintArea = Null

End Sub
************

What I would rather like to have is a more dynamic approach ....
whatever rows and columns I select
say next time ... I would like to have row 5-15 ( because I have selected
them)
.... same number of columns though

maybe someone can point me to right direction
(I am using Access 2000)

Thanks, Gina
 
S

SteveW

This is an Excel forum :)

Pilot's answer assumed you wanted the headers printed - because you
mentioned them.

Steve
 
G

Gina M.

sorry ... I may then have to find a different forum ?
I am too new to even find my way through here

thanks anyway
Gina


This is an Excel forum :)

Pilot's answer assumed you wanted the headers printed - because you
mentioned them.

Steve
 
G

Gina M.

Steve
unbelievable ... I meant Excel ....
2000 ... I was probably thinking about better using access and wrote ...
ashes on my head

Gina

I'd answer, but I don't use Acess so can't quite help

Steve
 
S

SteveW

Mmmmm.

So the gist is that you want to select an area and print it from a macro
(button I guess)

2nd bit, was to remember the columns and on subsequent range selections
just alter the rows (using the previous columns)

Your macro works - but only for the area you hard-coded in.

Off to think - sorry

Steve
 
G

Guest

How about:

Sub PrintSelection()
Selection.PrintOut Copies:=1
End Sub

That will send whatever you have currently selected to the default printer.
 

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