LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.charting
John
 
Posts: n/a
Default Select first chart in sheet

I would like to select the first chart in the sheet and set the min and max
values... the code says an object is not set... any help is appreciated!

Dim MinVal As Range
Dim MaxVal As Range
Dim ch As Chart
Set MinVal = ActiveSheet.Range("o17").Value
Set MaxVal = ActiveSheet.Range("o16").Value
ch = ActiveSheet.ChartObjects(1).Chart


For Each ch In ActiveSheet.ChartObjects
Select Case ch.ChartType
Case xlLineMarkers
With ch.Axes(xlCategory)
.MinimumScale = MinVal
.MaximumScale = MaxVal
End With
End Select
Next
End Sub
 
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
Chart Property Confusion Arturo Charts and Charting in Excel 4 December 16th 05 05:13 AM
Still can select locked cells in protected sheet Andy New Users to Excel 11 October 29th 05 07:45 PM
Error 1004 using array in Sheet select. Trefor Excel Discussion (Misc queries) 4 September 7th 05 07:29 PM
Copying chart to another sheet Rebecca Excel Worksheet Functions 1 July 22nd 05 06:46 PM
HELP required: Insert -> Hyperlink -> ???(no CHART sheet name)!!! [email protected] Excel Worksheet Functions 1 April 27th 05 11:48 AM


All times are GMT +1. The time now is 12:48 AM.

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

About Us

"It's about Microsoft Excel"