ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Locking range for view of Excel Sheet on button click (https://www.excelbanter.com/excel-programming/304148-locking-range-view-excel-sheet-button-click.html)

sameerce[_21_]

Locking range for view of Excel Sheet on button click
 
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

--
Message posted from http://www.ExcelForum.com


Tom Ogilvy

Locking range for view of Excel Sheet on button click
 
Dim rng as Range
set rng = Activesheet.ChartObjects(1).TopLeftCell
Application.Goto Reference:=rng, Scroll:=True

--
Regards,
Tom Ogilvy

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

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

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

Can any one help me out with this.

Thanks,
Sameer


---
Message posted from http://www.ExcelForum.com/





All times are GMT +1. The time now is 05:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com