Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
preview chart problem!
The code bellow will print preview all charts from active
sheet only if workbook is in exclusive mode (used by one user). Because i want to place my workbook onto network drive to be used by students i need to set workbook to shared mode. but in this case code will print preview the last chart that has been previewed when in exclusive mode. i inserted msgbox within for/next loop to get chart names and indexes before preview and it displays corect names but next line mychart(x).chart.printpreview displays the last chart that has been displayed when in exclusive mode. please any help would be appriciated thanks, Private Sub cmd_Click() Dim myChart As ChartObjects Dim X As Integer Dim ChartList As Integer Dim nm As String, mi As Long Dim i As Integer ChartList = ActiveSheet.ChartObjects.Count Set myChart = ActiveSheet.ChartObjects For X = 1 To ChartList nm = myChart(X).Chart.Name 'mi = myChart(x).Chart.Index MsgBox "name is " & nm & " and index is " & mi myChart(X).Chart.PrintPreview Next |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
preview chart problem!
Answered in the charting newsgroup.
- Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech.com/ _______ nebsrc wrote: The code bellow will print preview all charts from active sheet only if workbook is in exclusive mode (used by one user). Because i want to place my workbook onto network drive to be used by students i need to set workbook to shared mode. but in this case code will print preview the last chart that has been previewed when in exclusive mode. i inserted msgbox within for/next loop to get chart names and indexes before preview and it displays corect names but next line mychart(x).chart.printpreview displays the last chart that has been displayed when in exclusive mode. please any help would be appriciated thanks, Private Sub cmd_Click() Dim myChart As ChartObjects Dim X As Integer Dim ChartList As Integer Dim nm As String, mi As Long Dim i As Integer ChartList = ActiveSheet.ChartObjects.Count Set myChart = ActiveSheet.ChartObjects For X = 1 To ChartList nm = myChart(X).Chart.Name 'mi = myChart(x).Chart.Index MsgBox "name is " & nm & " and index is " & mi myChart(X).Chart.PrintPreview Next |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Page Preview/Print Problem | New Users to Excel | |||
Print Preview Problem in Excel | Excel Discussion (Misc queries) | |||
Problem w/Print Preview since upgrade to office 2003 | Excel Discussion (Misc queries) | |||
Page Break Preview Problem | Excel Worksheet Functions | |||
VBA Problem - Print Preview | Excel Programming |