Locking range for view of Excel Sheet on button click

S

sameerce

Hi,
I am working on an Excel VBA Application which has 2 graphs on
worksheet. I have added some buttons at the top of the sheet, so tha
only clicking one, the graph related to that button is seen. This i
done by hiding the rows containing the other graph and unhiding for th
selected graph.

But, the problem is that if the user scrolls down beneath the range o
graphs and then clicks on any of the buttons, the graphs are no
directly visible. The user has to scroll up in that case to view th
graph.

Is there any way that the certain range where the graphs are presen
are only made visible on button click. I tried select range option bu
it does not helps.

Can any one help me out with this.

Thanks,
Samee
 
T

Tom Ogilvy

Dim rng as Range
set rng = Activesheet.ChartObjects(1).TopLeftCell
Application.Goto Reference:=rng, Scroll:=True
 

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

Top