![]() |
Cube functions won't refresh when Printing
Hi -
I'm developing a Excel 2007 worksheet that uses cube functions. The cells holding cube functions refresh everytime I click on a different ID stored in a datagrid. So when I click a different ID in the datagrid, the worksheet populates with the data in the grid which is associated with the ID. Simple enough (once you know what to do). The problem I'm having is with the print program ... I wrote a program to move through the datagrid one ID at a time and then use PrintOutEx to print the exhibit. Well, the cells with the cube functions won't update or refresh themselves, showing blank values instead. The code is as follows: private void btnPrinter_Click(object sender, EventArgs e) { Excel.Workbook currentWB = (Excel.Workbook) Globals.ThisWorkbook.Application.ActiveWorkbook; Object missing = System.Reflection.Missing.Value; Globals.Sheet2.tblUserInterface_MasterBindingSourc e.MoveFirst(); currentWB.RefreshAll(); int n = 1; do { Globals.Sheet1.PrintOutEx(1, 1, 1, false, missing, missing, missing, missing, false); Globals.Sheet2.tblUserInterface_MasterBindingSourc e.MoveNext(); currentWB.RefreshAll(); n++; } while (n <= 5); //while (n <= Globals.Sheet2.tblUserInterface_MasterBindingSourc e.Count); } Obviously any comments are appreciated. Thank You Mark |
All times are GMT +1. The time now is 12:21 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com