LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 846
Default Adjusting Y axis scale of a chart using a scrollbar?


Ignore the below .

I dropped my code in the Workbook_SheetCalculate event and heypresto.

Thanks Again!

"Brad" wrote:

Thanks. You've sent me off on a new path, but I haven't quite been able to
crack it yet.

What I have is the slider (scrollbar) updating a value on Sheet1 in cel H1.
I then try to grab this value and use it as my maximum Y axis value. I put
the below code in the Workbook_SheetChange event. I can see it update the
value on the sheet but it doesn't update the graph's y axis value.

However when I go into the sheet and update a cell my graph will change.
What is it that I'm missing?

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)

MyValue = Sheets("Sheet1").Cells(1, 8).Value
Sheets("Sheet1").ChartObjects("Chart 1").Activate
ActiveChart.Axes(xlValue).Select
With ActiveChart.Axes(xlValue)
.MaximumScale = MyVal
.MinorUnitIsAuto = True
.MajorUnitIsAuto = True
.DisplayUnit = xlNone
End With

End Sub

Ta
Brad


"OssieMac" wrote:

Hi Brad,





 
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
How to force chart axis to same scale Sandusky Excel Discussion (Misc queries) 3 February 18th 09 04:57 AM
Adjusting scale of an adjsuting chart [email protected] Excel Programming 1 July 17th 07 09:10 PM
How to draw chart: log scale on X axis, natural scale on y axis? Pratap D. chavan Charts and Charting in Excel 1 November 16th 06 08:03 AM
Scale on X & Y Axis of the scatter chart chanyke Charts and Charting in Excel 3 April 28th 06 02:01 AM
How do I split the y-axis scale on a chart? Chaz Charts and Charting in Excel 2 April 27th 05 10:13 PM


All times are GMT +1. The time now is 03:20 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"