ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Navigation Buttons (https://www.excelbanter.com/excel-programming/296306-navigation-buttons.html)

dcstech

Navigation Buttons
 
I am trying to create navigation buttons ie........Up,Down,Left,Right. How can I tell (in vba)when i am at the very top of the page or at the very bottom. The buttons work fine but when i get to the top the buttons want to keep moving up everytime I press the "UP" button. If there was some command that said "Yes you are at the top" or "Yes you are at the bottom" then I could do an If Then statement to correct this

Thanks
dcstech

Jim Rech

Navigation Buttons
 
If by "at the top" you mean that row 1 is visible then you can check that
with:

If ActiveWindow.ScrollRow = 1 Then ...

It could get more complicated though if say row 1 is hidden.

--
Jim Rech
Excel MVP
"dcstech" wrote in message
...
|I am trying to create navigation buttons ie........Up,Down,Left,Right. How
can I tell (in vba)when i am at the very top of the page or at the very
bottom. The buttons work fine but when i get to the top the buttons want to
keep moving up everytime I press the "UP" button. If there was some command
that said "Yes you are at the top" or "Yes you are at the bottom" then I
could do an If Then statement to correct this.
|
| Thanks,
| dcstech




All times are GMT +1. The time now is 01:04 PM.

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