Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Cube refresh Date | Excel Discussion (Misc queries) | |||
cube functions | Excel Worksheet Functions | |||
How do I refresh 2 pivot tables from same OLAP cube | Excel Discussion (Misc queries) | |||
OLAP Cube Refresh Excel 2003 | Excel Discussion (Misc queries) | |||
CUBE FUNCTIONS! | Excel Programming |