Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
print button prints two images in same chart
I have an activex command button, "CommandButton1" on Sheet1, which issues command "UserForm1.Show"; in Userform1 I have a command button, "PrintIt" with the single line "ActiveWorkbook.Sheets("Chart2").PrintPreview" in the _click event handler. (The same problem occurs with "printout", but this way I don't waste the paper.) What happens is, I get the chart in the preview window, but it's as if there is a smaller version of the chart on top of a larger version. As I indicated, if I use "...printout" instead of "...printpreview", it prints this way, too, i.e., with "2 images" of the chart, a smaller superimposed on a larger. The same line, "ActiveWorkbook.Sheets("Chart2").PrintPreview" (or ..PrintOut), when attached directly to a command button on the spreadsheet, works as expected, with only one image of the chart. Be warned: if you try this with "PrintPreview", it'll hang up the sheet to the point that only killing it from taskman will get you out. here's the code for the button on the spreadsheet that calls printpreview itself Private Sub CommandButton2_Click() ActiveWorkbook.Sheets("Chart2").PrintPreview End Sub and here's the code that calls it from the command button on the userform: Private Sub cbPrintIt_Click() ActiveWorkbook.Sheets("Chart2").PrintPreview End Sub And that's all the code there is in the entire workbook. Reproduce it yourself, you'll see. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Prints only part of specificed print area | Excel Discussion (Misc queries) | |||
When I clear a print area, it still prints. | Excel Worksheet Functions | |||
I want to print at 100% but prints only at 60% | Excel Worksheet Functions | |||
add different button images | Excel Programming | |||
Will not print exactly as print prviw, skps text, prints on eithr | Excel Discussion (Misc queries) |