Thread: Print Macro..
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Murph Murph is offline
external usenet poster
 
Posts: 37
Default Print Macro..

Thanks for the response -

I'm asking to print columns A:F and then columns L:O; skipping the
information from G:K

So I was wondering how to do that,
"For ILoop = 1 to 6:12 to 15" ??

Thanks for your help I really appreciate it




"Ken Hudson" wrote:

Are you asking to print only columns A:F? If so, change:

For ILoop = 1 to 15
to
For ILoop = 1 to 6

and change:

Range("A1:B15").PrintOut Copies:=1, Collate:=True
to
Range("A1:B6").PrintOut Copies:=1, Collate:=True

--
Ken Hudson


"Murph" wrote:

Ken this is perfect - thanks.

Follow up question - I only want up to row F to print in the group; so A:F
and then row L:O to print can I eliminate the rows I do not want and maintain
the same look?



"Ken Hudson" wrote:

In this solution the user will prompted for the row they wish to print.

Sub Transpose()
Dim Ans As Integer
Dim Iloop As Integer
Application.ScreenUpdating = False
Ans = InputBox("Enter row number to print.")
Columns("A:B").Insert
For Iloop = 1 To 15
Cells(Iloop, "A") = Cells(2, Iloop + 2)
Cells(Iloop, "B") = Cells(Ans, Iloop + 2)
Next Iloop
Range("A1:B15").PrintOut Copies:=1, Collate:=True
Columns("A:B").Delete
Application.ScreenUpdating = False
End Sub

--
Ken Hudson


"Murph" wrote:

I am trying to create a macro that will print out a row of information. This
macro will be embedded into an autoshape at the end of each row.

The Column Titles are in Row 2 from A2:O2
The information that I would like to print out is in A3:O3

The print would have the column title followed by the information from the
cell below it. (i.e.: A2 with A3's info to the right of the title, B2 with
B3's info to the right of it, etc. etc. up to O2 and O3) The macro would grab
the column titles and the information from the assigned row and print out to
the default printer.

in Cell P3 I have placed the clickable autoshape for the macro to be
embedded into.
I want to use this macro in every row there after still keeping Row A2:O2 as
the titles. Is this possible?