Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Series function& protect sheet in excel 2007

Dear all,

I am making an excel spreadsheet for 2007 and 2003. The way I am doing this
is making everything in excel 2007 and save is as excel 2003 (compatibility
mode). In the VBA, I wrote:

Quote:
Set Ser22 = ActiveSheet.ChartObjects("Chart 2").Chart.SeriesCollection(1)
Ser22.Values = Range(Cells(1, 25), Cells(n, 25))
Ser22.XValues = Range(Cells(1, 24), Cells(n, 24))
With ActiveSheet.ChartObjects("Chart 2").Chart.Axes(xlValue)
..MinimumScale = 0
..MaximumScale = Range("D16")
End With
With ActiveSheet.ChartObjects("Chart 2").Chart.Axes(xlCategory)
..MinimumScale = 0
..MaximumScale = Range("D15")
End With
The code above controls a chart where the n is total points (dots) that is
going to be plotted. The chart is XYscatter style (only dots, no lines).

I saved it, everything works very well!

I put a mouse scroll protection (vba code) on the sheet and protect the
sheet with password. All boxes contain formulas/results are not locked.

With the protection, this sheet works fine in excel 2003, however, excel
2007 says error for:

Quote:
Ser22.Values = Range(Cells(1, 25), Cells(n, 25))
It said:

Quote:
Run-time error '-2147467259 (80004005)':

Method 'Values' of object 'Series' failed
Is this a bug in excel 2007? I know that I am going to save this worksheet
as excel 2007 (.xlsm I guess if I am not mistaken with the file name), but
how do I make this working?

I also made a copy and converted the new copy to 2007 version (.xlsm), it
seems that the problem still exists. I really do not have any ideas how to
solve this problem.

Please help and advice. Thank you in advance.
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
Protect sheet Excel 2007 teepee Excel Discussion (Misc queries) 7 March 31st 07 10:55 AM
Protect sheet Excel 2007 teepee Excel Programming 7 March 31st 07 10:55 AM
How do use list with protect sheet function? quantn Excel Discussion (Misc queries) 0 February 18th 06 05:56 PM
How do I protect sheet, but allow "group" function to work dwsmha Excel Discussion (Misc queries) 1 August 29th 05 11:25 PM
How do I protect work sheet against the "Delete" function? Kev Nurse Excel Discussion (Misc queries) 1 February 17th 05 03:01 AM


All times are GMT +1. The time now is 05:58 PM.

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"