Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default print range based on cell input

hi,
i have created a components list that contains all the components we
make, this components list is a single worksheet with all the parts diagrams
and ammount required. the ammount required is automatically inputted from
the calculations sheet. beside each component (80 components) i have a print
button with this code in it:

Private Sub CommandButton1_Click()

ActiveWindow.SmallScroll Down:=12
Range("A3:K55").Select
Range("K55").Activate
Selection.PrintOut Copies:=1, Collate:=True
Range("B3").Select

End Sub

this works quite well but still requires the operator to go through this
large sheet to find the components that are required and hit the print
button. some orders don't require all parts.

is it possible to have another button at the top so that if the ammount cell
(eg: c8) has a number greater than zero it will print the range:
Range("A3:K55")? the code used to do this could then be copied in 80 times
with a different ammount cell and range to give the desired result.
thanks in advance

regards
john


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default print range based on cell input

hi don,
this looks like what i'm after, i just want to insert it into a
button 80 time with different cell referrences. this i can't work out.
regards
john



"Don Guillett" wrote in message
...
try this ONE liner
Sub printrng()
if range("c0")0 then range("a3:k55").Printout
End Sub

--
Don Guillett
SalesAid Software

"john" wrote in message
...
hi,
i have created a components list that contains all the components we
make, this components list is a single worksheet with all the parts

diagrams
and ammount required. the ammount required is automatically inputted

from
the calculations sheet. beside each component (80 components) i have a

print
button with this code in it:

Private Sub CommandButton1_Click()

ActiveWindow.SmallScroll Down:=12
Range("A3:K55").Select
Range("K55").Activate
Selection.PrintOut Copies:=1, Collate:=True
Range("B3").Select

End Sub

this works quite well but still requires the operator to go through this
large sheet to find the components that are required and hit the print
button. some orders don't require all parts.

is it possible to have another button at the top so that if the ammount

cell
(eg: c8) has a number greater than zero it will print the range:
Range("A3:K55")? the code used to do this could then be copied in 80

times
with a different ammount cell and range to give the desired result.
thanks in advance

regards
john






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default print range based on cell input

With more info, perhaps we can be of more help in your coding efforts.If
there are a lot of IFs perhaps a choose or select case macro?

--
Don Guillett
SalesAid Software

"john" wrote in message
...
hi don,
this looks like what i'm after, i just want to insert it into

a
button 80 time with different cell referrences. this i can't work out.
regards
john



"Don Guillett" wrote in message
...
try this ONE liner
Sub printrng()
if range("c0")0 then range("a3:k55").Printout
End Sub

--
Don Guillett
SalesAid Software

"john" wrote in message
...
hi,
i have created a components list that contains all the components

we
make, this components list is a single worksheet with all the parts

diagrams
and ammount required. the ammount required is automatically inputted

from
the calculations sheet. beside each component (80 components) i have a

print
button with this code in it:

Private Sub CommandButton1_Click()

ActiveWindow.SmallScroll Down:=12
Range("A3:K55").Select
Range("K55").Activate
Selection.PrintOut Copies:=1, Collate:=True
Range("B3").Select

End Sub

this works quite well but still requires the operator to go through

this
large sheet to find the components that are required and hit the print
button. some orders don't require all parts.

is it possible to have another button at the top so that if the

ammount
cell
(eg: c8) has a number greater than zero it will print the range:
Range("A3:K55")? the code used to do this could then be copied in 80

times
with a different ammount cell and range to give the desired result.
thanks in advance

regards
john








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
How to input pictures automatically based on cell input? bsharp Excel Worksheet Functions 9 May 30th 09 07:16 AM
run macro with input msg based on cell input Janelle S Excel Discussion (Misc queries) 0 January 20th 08 05:23 AM
Select cell from range based on input in excel xp dingy101 Excel Discussion (Misc queries) 3 November 20th 05 12:05 AM
CODE to select range based on User Input or Value of Input Field Sandi Gauthier Excel Programming 4 December 8th 03 03:22 PM
Macro to input formula in range based on another range Peter Atherton Excel Programming 0 October 9th 03 12:47 AM


All times are GMT +1. The time now is 08:18 PM.

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

About Us

"It's about Microsoft Excel"