Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA IF FUNCTIONS WITH PRINT RANGE
I have a sheet that has 16 different tables. Each table has 1 value, it is
either zero, or a number greater than zero. If it is greater than zero then I need the table or tables to print out. I am familiar with macros and buttons, but how do I do the if function and print range through vba. I can send the spreadsheet for better understanding if you need me to. thanks, Hamed Parhizkar |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA IF FUNCTIONS WITH PRINT RANGE
the basic code would be:
IF Range("table1") 0 then .... (place the code necessary to print the range here) End IF In this example table1 represents the cell where the value of the first table is found. you could replace this with Range("A1") Cheers, Shane "Hamed parhizkar" wrote in message ... I have a sheet that has 16 different tables. Each table has 1 value, it is either zero, or a number greater than zero. If it is greater than zero then I need the table or tables to print out. I am familiar with macros and buttons, but how do I do the if function and print range through vba. I can send the spreadsheet for better understanding if you need me to. thanks, Hamed Parhizkar |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA IF FUNCTIONS WITH PRINT RANGE
Here is what I have in and it worked but the tables that were zero still
printed??? What am I doing wrong??? If Range("C28") 0 Then Range("A23:D34").Select ActiveSheet.PageSetup.PrintArea = "$A$23:$D$34" ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True "Shane Devenshire" wrote: the basic code would be: IF Range("table1") 0 then .... (place the code necessary to print the range here) End IF In this example table1 represents the cell where the value of the first table is found. you could replace this with Range("A1") Cheers, Shane "Hamed parhizkar" wrote in message ... I have a sheet that has 16 different tables. Each table has 1 value, it is either zero, or a number greater than zero. If it is greater than zero then I need the table or tables to print out. I am familiar with macros and buttons, but how do I do the if function and print range through vba. I can send the spreadsheet for better understanding if you need me to. thanks, Hamed Parhizkar |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
excel spreadsheet print functions | Excel Worksheet Functions | |||
Print Blank Pgs - Preview margins outside print range | Excel Discussion (Misc queries) | |||
excel print functions | Excel Programming | |||
How to print detailed instructions for all functions in Excel? | Excel Worksheet Functions | |||
How can I print out a list of statistical functions in Excel (I d. | Excel Worksheet Functions |