Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Charting / August 2003

Tip: Looking for answers? Try searching our database.

Customize axis scale

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Felipe - 22 Aug 2003 20:14 GMT
I have a spreadsheet with dates and data to be graphed for
each date. I would like to customize the x-axis(time)
scale without having to edit the chart. The graph will be
used and seen by many users, so I would like the user to
input the initial and final dates in cells so the scale is
automaticaly updated.

I tried writing a macro for this and asigning it to a
botton, but I get an error in the following line:
   .MinimumScale = Range("E2").Value

E2 is the celll where the user inputs initial date.

I would apreciate help with the VBA code, and would like
to know if you can think of a simpler way to do this.

Thanks for your help,
Felipe
Debra Dalgleish - 22 Aug 2003 22:07 GMT
The following code, run from a command button, worked:

Sub ChangeScale()
  ActiveSheet.ChartObjects(1).Activate
  With ActiveChart.Axes(xlCategory)
    .MinimumScale = Range("E2").Value
  End With
End Sub

Are you sure that the value in cell E2 is a valid date?
What error are you getting?

> I have a spreadsheet with dates and data to be graphed for
> each date. I would like to customize the x-axis(time)
[quoted text clipped - 14 lines]
> Thanks for your help,
> Felipe

Signature

Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

Felipe I - 25 Aug 2003 21:53 GMT
It worked!

Thank you very much ... I still don´t know what I was
doing wrong though...
>-----Original Message-----
>The following code, run from a command button, worked:
[quoted text clipped - 27 lines]
>> Thanks for your help,
>> Felipe
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.