LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 1
Default macroprints two images


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.

Thank you for any assistance
 
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
Linking images coultersc Excel Worksheet Functions 0 August 21st 08 02:35 AM
Chart.Export images are shrinking as I export more images Jared Charts and Charting in Excel 3 January 29th 08 03:23 AM
set properties for images samara Excel Discussion (Misc queries) 0 September 18th 07 04:02 PM
display images Sally Excel Discussion (Misc queries) 0 February 13th 07 03:30 PM
Images in Excel? jbrzez Excel Discussion (Misc queries) 1 January 30th 07 07:24 PM


All times are GMT +1. The time now is 11:03 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"