Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default 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
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
Page Preview/Print Problem [email protected] New Users to Excel 3 December 31st 09 05:39 PM
Print Preview Problem in Excel Alex Excel Discussion (Misc queries) 1 August 19th 08 01:23 PM
Problem w/Print Preview since upgrade to office 2003 Meenie Excel Discussion (Misc queries) 2 May 24th 07 06:16 PM
Page Break Preview Problem Re learning Excel Excel Worksheet Functions 2 August 10th 06 06:35 AM
VBA Problem - Print Preview carljonesuk[_3_] Excel Programming 1 February 9th 04 03:39 PM


All times are GMT +1. The time now is 07:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"