LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.charting
Ray Ray is offline
external usenet poster
 
Posts: 267
Default Hiding & Unhiding graphs...

Hello -

I've got a sheet that contains 4 graphs -- the graphs are already
built and update fine. Rather than have 4 small graphs or make users
switch sheets, I want to use a spin-button to let them scroll through
the graphs.

I've inserted the spin-button and linked it to cell T2 -- available
values are 1-4 and is working properly. However, I can get the graphs
to hide/unhide when T2 changes. I tried this out on two of the
graphs, code below:
***************
Private Sub Worksheet_Change(ByVal Target As Excel.Range)

If Target.Address = "$t$2" Then
Application.EnableEvents = False
If Target.Value = 1 Then
ActiveSheet.ChartObjects("Chart 1").Visible = True
ActiveSheet.ChartObjects("Chart 7").Visible = False
Else
ActiveSheet.ChartObjects("Chart 7").Visible = True
ActiveSheet.ChartObjects("Chart 1").Visible = False
End If
Application.EnableEvents = True
End If

*****************

What am I doing wrong? Remember that I also need to modify the code
to rotate through all 4 of the graphs.

AND, is there a way to make the the spin-button 'scroll' through the
values? So, it would go 1-2-3-4-1-2-3-4? Right now, it only goes
1-2-3-4-3-2-1-2...

TIA,
Ray

 
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
Hiding & Unhiding Cells, How to Create a calendar drop down box Excel Discussion (Misc queries) 0 January 26th 07 05:12 PM
Hiding/Unhiding Columns Karen McKenzie Excel Worksheet Functions 3 August 10th 06 11:49 AM
Hiding/Unhiding Columns xkarenxxxx Excel Worksheet Functions 8 June 5th 06 02:18 PM
Hiding and unhiding sheets D.Hay Excel Discussion (Misc queries) 2 December 10th 05 03:59 PM
Hiding/Unhiding Bobby Excel Worksheet Functions 2 May 25th 05 10:40 PM


All times are GMT +1. The time now is 07:06 AM.

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"