Button on Chart

  • Thread starter Thread starter MBlake
  • Start date Start date
M

MBlake

Is it possible to use a button on a Chart?. I have several charts linked to
an index worksheet but need to give the user a way to quickly return to that
index from a selected chart.

I have tried the Control Toolbox and the |Forms Toolbox but al options are
greyed out. I have also looked at making the chart or chart title etc. a
hyperlink to no avail.

Any ideas would be appreciated,
Mickey
 
Hi,
To work around this I have added an autoshap arrow to a chart and
hyperllinked that back to the main index sheet. Can anyone advise if there
are any pitfalls with this method please.

Thanks,
Mickey
 
The forms toolbox button can be placed on a chart sheet. Not sure why it
appears grayed out - is the chart protected.

Another possibility is that you didn't look closely enough. Some of the
controls on the forms toolbar are disabled, but the button isn't.
 
Thanks Tom,
I rechecked and the Toolbox controls are all grayed out. I have now got an
autoshape linked to a macro and that is working okay and I like the arrow as
a good visible representation of the return function. One further point
that you may be able to help with - I have linked the autoshape to a small
macro but for some reason the macro fails to close the previously opened
chart, can you see why?

I use the Call HideSheets code in other places and was hoping the call would
close the opened chart as it does elsewhere.

Mickey

Sub ChartClose()
'
' ChartCloseMacro
' Keyboard Shortcut: Ctrl+Shift+C
'
Call HideSheets
Sheets("database").Select
End Sub
------------------------------------------------------------------------
Sub HideSheets()
'
' HideSheets Macro
' Macro recorded 02/08/2005 by Michael John Blake
'
' Keyboard Shortcut: Ctrl+h
'
On Error Resume Next
Sheets("pivotStrategy1").Visible = False
Charts("Strategy1").Visible = False
Sheets("pivotStrategy2").Visible = False
Charts("Strategy2").Visible = False
Sheets("pivotStrategy3").Visible = False
Charts("Strategy3").Visible = False
Sheets("pivotStrategy4").Visible = False
Charts("Strategy4").Visible = False
Sheets("pivotStrategy5").Visible = False
Charts("Strategy5").Visible = False
Sheets("pivotStrategy6").Visible = False
Charts("Strategy6").Visible = False
Sheets("pivotSD").Visible = False
Charts("SanctionedDetections").Visible = False
Sheets("pivotAllArrests").Visible = False
Charts("Arrests").Visible = False
Sheets("pivotSummons").Visible = False
Charts("Summons").Visible = False
Sheets("pivotSpeed").Visible = False
Charts("Speed").Visible = False
Sheets("pivotDivs").Visible = False
Charts("DivisionalActivity").Visible = False

End Sub

-----------------------------------------------------------------------------------------
 
I said FORMS toolbar, not TOOLBOX.

Is the chart listed in your macro? If not, that would be a reason. (Don't
be too quick - could be a spelling error)
 
Cheers Tom,
The forms toolbox works although I will stick with the autoshape arrow this
time. I'm not sure about the chart not closing as the same macro runs on the
Workbook_Open() event without problem. When the user selects a chart I am
running some code to unprotect and update the linked pivottable as this
ensures the chart is refreshed and then protected before the end-user can
accidentally delete it (they do). I'll go through that as perhaps the
answer is within that piece of code.

Thanks again,
Mickey
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top