LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 110
Default Chart Variables

I am using Excel 2003. I'm using "Option Explicit" to force variable
declaration. I want to tie the axes of a chart that I have named "MyChart"
to worksheet cells. I've been working with the following but continue to get
errors:

Dim Cht as ChartObject

Set Cht = Worksheets("Model").ChartObjects("MyChart").Chart

With Cht.Axes(xlValue)
.MaximumScale = Sheets("Charts").Range("C7")
.MinimumScale = Sheets("Charts").Range("C9")
.MajorUnit = Sheets("Charts").Range("C8")
End With

If I take out the "Option Explicit" I can get things to work. However, I
would like to keep it in my code to help make sure I am declaring variables
correctly.

Can anyone advise as to what I am doing wrong? Thank you in advance for
your help.

--
Steph
 
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 with three variables glasbergenm Charts and Charting in Excel 9 April 30th 23 03:45 AM
referencing a value from a chart with 3 variables KP@RG New Users to Excel 1 December 12th 06 02:29 PM
Using variables in Chart Ranges [email protected] Charts and Charting in Excel 1 May 9th 06 12:56 AM
graphing two variables on one chart James Charts and Charting in Excel 3 July 13th 05 03:01 PM
Use variables for a chart Fysh Charts and Charting in Excel 4 December 9th 04 08:45 PM


All times are GMT +1. The time now is 10:12 PM.

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"