Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a workbook with a data table and several hidden charts.
I created a dialog box menu which has several pre-defined filters for the data sheet and the ability to view the normally hidden charts. To keep things simple for the user, I make sure that the chart is the only viewable sheet when they select it... I hide all other charts including the data sheet. I also have it coded so that when they close the dialog, it automatically opens the data sheet and closes all open charts. I want to put a Print Button on the dialog to print the various sheets. Unfortunately, I can't get the print to execute without closing the dialog first, running the print code, and reopening the form. This works fine for printing the data sheet, but it won't work for printing the charts because I hide all charts upon closing the dialog box so they don't get stuck in limbo. Hence, I can't print the charts. It seems like with a dialog box open, you can't change the focus of VBA to the worksheet and that is where my problem lies.... Any ideas on how to make this work would be appreciated. Here's my code: For reference, the dialog "ReportCard" is where I select different charts... So when this button is clicked, the chart is already open. The other 2 menus are used to filter the data. Private Sub cmdPrintPage_Click() Unload Me Call PrintThisPage("ReportCard") End Sub Sub PrintThisPage(menuname) ActiveWindow.SelectedSheets.PrintPreview ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True Select Case menuname Case "Buyer" BuyerMenu2.Show Case "PTL" PTLMenu2.Show Case "ReportCard" ReportCard.Show End Select End Sub Thanks, MikeZz |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Hiding the 'printing' dialog box | Excel Discussion (Misc queries) | |||
Suppressing or turning off the Printing dialog | Excel Programming | |||
Dialog sheet / Checkboxes | Excel Programming | |||
Dialog Sheet not updating | Excel Programming | |||
Customisation of Chart Dialog | Excel Programming |