Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to input pictures automatically based on cell input? | Excel Worksheet Functions | |||
run macro with input msg based on cell input | Excel Discussion (Misc queries) | |||
Select cell from range based on input in excel xp | Excel Discussion (Misc queries) | |||
CODE to select range based on User Input or Value of Input Field | Excel Programming | |||
Macro to input formula in range based on another range | Excel Programming |