#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 43
Default Printing

How to set a button in excel to print a specified area, for eg if i click on
a colum (say, A5), i need to print a specified area immediately.. Please help
on this topic
--
Life isa journey not a destination
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 143
Default Printing

you can just name range to be print in macro like here-

Range("Range1").PrintOut

Range("G3:H15").PrintOut

"Sherees" wrote in message
...
| How to set a button in excel to print a specified area, for eg if i click
on
| a colum (say, A5), i need to print a specified area immediately.. Please
help
| on this topic
| --
| Life isa journey not a destination

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 43
Default Printing

Thx for ur ans, but cud u pls educate me a little more in macro coz i dont
know anything abt macro.. I will clearly state my qn again
The sheet is a long report for an year which is seperated as week1 up to
week52
each week will be of a range (sayA1:H10) and on the top (say A1 wil be named
Week 1).. I need to print the entire area that is A1:H10 just by clicking the
cell A1(Week 1) in similar way i need to set for all the 52 weeks, just by
clicking on the weeks it should print the respective weekly report. Please
suggest me in simple terms
--
Life isa journey not a destination


"Homey" wrote:

you can just name range to be print in macro like here-

Range("Range1").PrintOut

Range("G3:H15").PrintOut

"Sherees" wrote in message
...
| How to set a button in excel to print a specified area, for eg if i click
on
| a colum (say, A5), i need to print a specified area immediately.. Please
help
| on this topic
| --
| Life isa journey not a destination

.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 143
Default Printing

maybe not posible to teach doing macros in this mesage, especlly for
somebody who english is worser than mine. joke.

but like Gord say maybe try record a macro. recodred macros are not always
the best but they get you going. you could even put my macro inside the one
you record. you have to change the range to print in my macro of course to
the one you want.

"Sherees" wrote in message
...
| Thx for ur ans, but cud u pls educate me a little more in macro coz i dont
| know anything abt macro.. I will clearly state my qn again
| The sheet is a long report for an year which is seperated as week1 up to
| week52
| each week will be of a range (sayA1:H10) and on the top (say A1 wil be
named
| Week 1).. I need to print the entire area that is A1:H10 just by clicking
the
| cell A1(Week 1) in similar way i need to set for all the 52 weeks, just by
| clicking on the weeks it should print the respective weekly report. Please
| suggest me in simple terms
| --
| Life isa journey not a destination
|
|
| "Homey" wrote:
|
| you can just name range to be print in macro like here-
|
| Range("Range1").PrintOut
|
| Range("G3:H15").PrintOut
|
| "Sherees" wrote in message
| ...
| | How to set a button in excel to print a specified area, for eg if i
click
| on
| | a colum (say, A5), i need to print a specified area immediately..
Please
| help
| | on this topic
| | --
| | Life isa journey not a destination
|
| .
|

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Printing

Will the ranges be different sizes?

Does the top left cell of each range have a name like Week1, Week2 etc.?

Do you have these ranges named already in InsertNameDefine or just a title
in a cell?



Gord

On Fri, 11 Dec 2009 10:20:01 -0800, Sherees
wrote:

Thx for ur ans, but cud u pls educate me a little more in macro coz i dont
know anything abt macro.. I will clearly state my qn again
The sheet is a long report for an year which is seperated as week1 up to
week52
each week will be of a range (sayA1:H10) and on the top (say A1 wil be named
Week 1).. I need to print the entire area that is A1:H10 just by clicking the
cell A1(Week 1) in similar way i need to set for all the 52 weeks, just by
clicking on the weeks it should print the respective weekly report. Please
suggest me in simple terms




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 43
Default Printing

Ranges are equal in size, Yes the top range has name like Week1 ,Week2... Its
just a title in a cell..

Thank u very much
--
Life isa journey not a destination


"Gord Dibben" wrote:

Will the ranges be different sizes?

Does the top left cell of each range have a name like Week1, Week2 etc.?

Do you have these ranges named already in InsertNameDefine or just a title
in a cell?



Gord

On Fri, 11 Dec 2009 10:20:01 -0800, Sherees
wrote:

Thx for ur ans, but cud u pls educate me a little more in macro coz i dont
know anything abt macro.. I will clearly state my qn again
The sheet is a long report for an year which is seperated as week1 up to
week52
each week will be of a range (sayA1:H10) and on the top (say A1 wil be named
Week 1).. I need to print the entire area that is A1:H10 just by clicking the
cell A1(Week 1) in similar way i need to set for all the 52 weeks, just by
clicking on the weeks it should print the respective weekly report. Please
suggest me in simple terms


.

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Printing

Couple of ways to do this.

Event code which is triggered by a double-click on a cell with the
appropriate text in it..............week1 or week52.....not case-sensitive

Option Compare Text
Private Sub Worksheet_BeforeDoubleClick(ByVal _
Target As Range, Cancel As Boolean)
If Left(Target, 4) < "week" Then GoTo ws_exit
Target.Resize(10, 8).PrintOut
ws_exit:
Cancel = True
End Sub

Right-click on the Sheet tab and "View Code". Copy/paste the code into that
module. Edit the resize(10, 8) to suit..............set now for a 10 row, 8
column range...........A1:H10 for example.

A macro which asks for user input of week number.

Sub print_week()
Dim weeknum As Integer
weeknum = InputBox("Enter a Number from 1 to 52")
With Worksheets(1).UsedRange
Set c = .Find("week" & weeknum, LookIn:=xlValues, lookat:=xlPart)
If Not c Is Nothing Then
FirstAddress = c.Address
c.Resize(10, 8).PrintOut
End If
End With
End Sub

This macro would be placed in a General module in your workbook.

Note.................neither has error-checking.

See Ron de Bruin's site for where and how to store macros and code.

http://www.rondebruin.nl/code.htm


Gord


On Fri, 11 Dec 2009 23:07:02 -0800, Sherees
wrote:

Ranges are equal in size, Yes the top range has name like Week1 ,Week2... Its
just a title in a cell..

Thank u very much


  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Printing

A5 is a cell reference, not a column.

Record yourself setting up a printrange and printing it.

Assign a button to that macro.

There is another method using event code and a double-click on a cell, say
A5, which will print a specified area.


Gord Dibben MS Excel MVP

On Thu, 10 Dec 2009 23:28:01 -0800, Sherees
wrote:

How to set a button in excel to print a specified area, for eg if i click on
a colum (say, A5), i need to print a specified area immediately.. Please help
on this topic


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing art Excel Discussion (Misc queries) 3 August 27th 08 06:40 AM
Excel Printing --Borders are not printing on the same page as data Stup88 Excel Discussion (Misc queries) 1 August 7th 07 09:34 AM
Printing a heading on each new page when printing Brian Excel Discussion (Misc queries) 3 November 15th 06 05:22 PM
Printing by row David Excel Discussion (Misc queries) 2 July 1st 05 02:38 AM
Enable Double sided printing contiuously when printing multiple s. Lee Excel Discussion (Misc queries) 1 November 27th 04 01:58 AM


All times are GMT +1. The time now is 05:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"